-
Notifications
You must be signed in to change notification settings - Fork 7
Deploy
Leonardo Soares e Silva edited this page Jun 1, 2022
·
12 revisions
- Instalar Nginx;
- Compilar o Python 3.9 com suporte shared libraries (https://www.edivaldobrito.com.br/como-instalar-o-python-3-9-no-linux-compilando-o-codigo-fonte/);
- Compilar o UWSGI;
- Compilar o plugin http e python39 para o UWSGI;
- Editar o arquivo de configuração do uwsgi e nginx: https://uwsgi-docs.readthedocs.io/en/latest/tutorials/Django_and_nginx.html
- Gerar o deploy do Angular com o script (deploy.sh)
- Gerar os estáticos do Django
- Reiniciar o Nginx (se der problema na permissão ver esse link: https://unix.stackexchange.com/questions/218747/nginx-says-open-etc-nginx-conf-d-foo-conf-failed-13-permission-denied)
- Criar o arquivo [ini] do uwsgi
- Acessar a pasta do uwsgi (~/downloads/uwsgi-2.0.20) e iniciar o uwsgi
uwsgi --ini /etc/uwsgi/apps-enabled/letscode-backend.ini
- Criar o service de execução do chat
Criar o arquivo
[Unit]
Description=CSCL
[Service]
ExecStart=/home/lsoaresesilva/www/32bits-doutorado-server/src/app-s.js
Restart=always
User=nobody
Group=nogroup
Environment=PATH=/usr/bin:/usr/local/bin
Environment=NODE_ENV=production
WorkingDirectory=/home/lsoaresesilva/www/32bits-doutorado-server
[Install]
WantedBy=multi-user.target
Iniciar: sudo systemctl start app
- Copiar as chaves SSH
- Gerar certificado SSL
https://www.nginx.com/blog/using-free-ssltls-certificates-from-lets-encrypt-with-nginx/