docker-compose.yaml 749 B

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