docker-compose.yaml 734 B

1234567891011121314151617181920212223242526272829
  1. services:
  2. nginx-proxy:
  3. build: nginx
  4. restart: always
  5. volumes:
  6. - ./nginx/default.conf:/tmp/default.conf
  7. environment:
  8. - FLASK_SERVER_ADDR=flask-app:8000
  9. ports:
  10. - "80:80"
  11. depends_on:
  12. - flask-app
  13. healthcheck:
  14. test: ["CMD-SHELL", "curl --silent --fail localhost:80/health-check || exit 1"]
  15. interval: 10s
  16. timeout: 10s
  17. retries: 3
  18. command: /app/start.sh
  19. flask-app:
  20. build: flask
  21. restart: always
  22. ports:
  23. - '8000:8000'
  24. healthcheck:
  25. test: ["CMD-SHELL", "curl --silent --fail localhost:8000/flask-health-check || exit 1"]
  26. interval: 10s
  27. timeout: 10s
  28. retries: 3
  29. command: gunicorn -w 3 -t 60 -b 0.0.0.0:8000 app:app