parent
703c50649d
commit
157e55a0e1
2 changed files with 36 additions and 0 deletions
@ -0,0 +1,35 @@ |
||||
# Развертывание приложения |
||||
|
||||
* Добавить админитратора в репозиторий |
||||
* Клонировать репозиторий `cd /opt && git clone git@gitlab.com:lilcity/backend.git && cd backend` |
||||
* Сборка фронта `cd web && npm install && npm run build` |
||||
* Запуск проекта `cd .. && docker-compose up -d` |
||||
* Примерный конфиг nginx: |
||||
|
||||
``` |
||||
server { |
||||
server_name SERVER_NAME; |
||||
|
||||
location ^~ /static { |
||||
alias /opt/backend/static; |
||||
} |
||||
|
||||
location ^~ /media { |
||||
alias /opt/backend/media; |
||||
} |
||||
|
||||
location / { |
||||
proxy_pass http://127.0.0.1:8000; |
||||
proxy_http_version 1.1; |
||||
proxy_set_header X-Real-IP $remote_addr; |
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
||||
} |
||||
|
||||
listen 80; |
||||
listen 443 ssl; # managed by Certbot |
||||
ssl_certificate /etc/letsencrypt/live/lilcity/fullchain.pem; # managed by Certbot |
||||
ssl_certificate_key /etc/letsencrypt/live/lilcity/privkey.pem; # managed by Certbot |
||||
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot |
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot |
||||
} |
||||
``` |
||||
Loading…
Reference in new issue