Skip to content
Leonardo Soares e Silva edited this page Jun 1, 2022 · 12 revisions
  1. Instalar Nginx;
  2. 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/);
  3. Compilar o UWSGI;
  4. Compilar o plugin http e python39 para o UWSGI;
  5. Editar o arquivo de configuração do uwsgi e nginx: https://uwsgi-docs.readthedocs.io/en/latest/tutorials/Django_and_nginx.html
  6. Gerar o deploy do Angular com o script (deploy.sh)
  7. Gerar os estáticos do Django
  8. 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)
  9. Criar o arquivo [ini] do uwsgi
  10. Acessar a pasta do uwsgi (~/downloads/uwsgi-2.0.20) e iniciar o uwsgi

uwsgi --ini /etc/uwsgi/apps-enabled/letscode-backend.ini

  1. 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

  1. Copiar as chaves SSH
  2. Gerar certificado SSL

https://www.nginx.com/blog/using-free-ssltls-certificates-from-lets-encrypt-with-nginx/