Merge branch 'nginx' into 'master'

Nginx

See merge request mathwave/sprint!12
This commit is contained in:
Egor Matveev 2022-03-29 12:45:51 +00:00
commit 54bab6bc70
2 changed files with 29 additions and 3 deletions

View File

@ -3,6 +3,22 @@ version: "3.4"
services:
nginx:
image: nginx
volumes:
- ./nginx:/etc/nginx
networks:
- net
ports:
- "80:80"
deploy:
mode: replicated
restart_policy:
condition: any
update_config:
parallelism: 1
order: start-first
postgres:
image: postgres
environment:
@ -80,9 +96,7 @@ services:
TELEGRAM_TOKEN: $TELEGRAM_TOKEN
volumes:
- /sprint-data/static:/usr/src/app/static
command: ./manage.py runserver 0.0.0.0:80 --noreload --insecure
ports:
- "80:80"
command: ./manage.py runserver 0.0.0.0:8000 --noreload --insecure
deploy:
mode: replicated
restart_policy:

12
nginx/nginx.conf Normal file
View File

@ -0,0 +1,12 @@
events {}
http {
server {
listen 80;
server_name a.com;
location / {
proxy_pass http://web:8000/;
}
}
}