1
0
Fork 0
mirror of https://github.com/docker/awesome-compose.git synced 2025-04-26 10:43:35 +02:00

adding nginx-wsgi-flask docker-compose sample

Signed-off-by: grantbirki <grant.birkinbine@gmail.com>
Signed-off-by: Grant Birkinbine <grant.birkinbine@gmail.com>
This commit is contained in:
grantbirki 2021-03-14 12:06:04 -07:00 committed by Grant Birkinbine
parent 017fd26b54
commit 55225b5e5c
No known key found for this signature in database
GPG key ID: B0409256808CFF4A
11 changed files with 335 additions and 0 deletions

View file

@ -0,0 +1,32 @@
version: "3.7"
services:
nginx-proxy:
build: nginx
restart: always
volumes:
- ./nginx/default.conf:/tmp/default.conf
environment:
- FLASK_SERVER_ADDR=flask-app:8000
ports:
- "80:80"
links:
- flask-app
depends_on:
- flask-app
healthcheck:
test: ["CMD-SHELL", "curl --silent --fail localhost:80/health-check || exit 1"]
interval: 10s
timeout: 10s
retries: 3
command: /app/start.sh
flask-app:
build: flask
restart: always
ports:
- '8000:8000'
healthcheck:
test: ["CMD-SHELL", "curl --silent --fail localhost:8000/flask-health-check || exit 1"]
interval: 10s
timeout: 10s
retries: 3
command: gunicorn -w 3 -t 60 -b 0.0.0.0:8000 app:app