Open raqueleucaria opened 11 months ago
etc/apache2/sites-available ---> 000-default.conf
<VirtualHost *:80>
ErrorLog /home/05_PipelineFinatec/site/logs/error.log
CustomLog /home/05_PipelineFinatec/site/logs/access.log combined
<Directory /home/05_PipelineFinatec/project/project>
Require all granted
</Directory>
WSGIDaemonProcess project python-home=/home/05_PipelineFinatec/venv python-path=/home/05_PipelineFinatec/project
WSGIProcessGroup project
WSGIScriptAlias / /home/05_PipelineFinatec/project/project/wsgi.py
- apachectl configtest (testa se esta ok)
- service apache2 restart
- tail -f /home/05_PipelineFinatec/site/logs/access.log (segue os erros, se tiver)
### STATIC
- site → public → static
- os arquivos devem estar em um endereço único, foi preciso adaptar as pastar do projeto
- settings.py:
STATIC_URL = '/static/' STATIC_ROOT = '/home/05_PipelineFinatec/site/public/static' MEDIA_ROOT = 'home/05_PipelineFinatec/site/public/static/imagem'
- python3 project/manage.py collectstatic ----> yes
<VirtualHost *:80>
ErrorLog /home/05_PipelineFinatec/site/logs/error.log
CustomLog /home/05_PipelineFinatec/site/logs/access.log combined
alias /static /home/05_PipelineFinatec/site/public/static
<Directory /home/05_PipelineFinatec/site/public/static>
Require all granted
</Directory>
alias /static /home/05_PipelineFinatec/site/public/static/imagem
<Directory /home/05_PipelineFinatec/site/public/static/imagem>
Require all granted
</Directory>
<Directory /home/05_PipelineFinatec/project/project>
Require all granted
</Directory>
WSGIDaemonProcess project python-home=/home/05_PipelineFinatec/venv python-path=/home/05_PipelineFinatec/project
WSGIProcessGroup project
WSGIScriptAlias / /home/05_PipelineFinatec/project/project/wsgi.py
- cd /home/05_PipelineFinatec/site
- chown -R www-data:www-data public/
- service apache2 restart
Descrição
Configurar o sistema para realizar o deploy da aplicação
Tarefas