diff --git a/docker-compose-deploy.yaml b/docker-compose-deploy.yaml index 70a8007..0a77cbd 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: @@ -81,8 +97,6 @@ services: volumes: - /sprint-data/static:/usr/src/app/static command: ./manage.py runserver 0.0.0.0:80 --noreload --insecure - ports: - - "80:80" deploy: mode: replicated restart_policy: diff --git a/nginx/nginx.conf b/nginx/nginx.conf new file mode 100644 index 0000000..b7d1df7 --- /dev/null +++ b/nginx/nginx.conf @@ -0,0 +1,7 @@ +server { + listen 80; + + location / { + proxy_pass http://web:8000/; + } +} \ No newline at end of file