diff --git a/docker-compose-deploy.yaml b/docker-compose-deploy.yaml index 70a8007..8fa1079 100644 --- a/docker-compose-deploy.yaml +++ b/docker-compose-deploy.yaml @@ -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: diff --git a/nginx/nginx.conf b/nginx/nginx.conf new file mode 100644 index 0000000..1321bf0 --- /dev/null +++ b/nginx/nginx.conf @@ -0,0 +1,12 @@ +events {} + +http { + server { + listen 80; + server_name a.com; + + location / { + proxy_pass http://web:8000/; + } + } +} \ No newline at end of file