Merge branch 'nginx' into 'master'
Nginx See merge request mathwave/sprint!12
This commit is contained in:
commit
54bab6bc70
@ -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
12
nginx/nginx.conf
Normal file
@ -0,0 +1,12 @@
|
||||
events {}
|
||||
|
||||
http {
|
||||
server {
|
||||
listen 80;
|
||||
server_name a.com;
|
||||
|
||||
location / {
|
||||
proxy_pass http://web:8000/;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user