compose.yaml 652 B

1234567891011121314151617181920212223242526272829
  1. services:
  2. web:
  3. image: nginx
  4. volumes:
  5. - ./nginx/nginx.conf:/tmp/nginx.conf
  6. environment:
  7. - FLASK_SERVER_ADDR=backend:9091
  8. command: /bin/bash -c "envsubst < /tmp/nginx.conf > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
  9. ports:
  10. - 80:80
  11. depends_on:
  12. - backend
  13. backend:
  14. build:
  15. context: flask
  16. target: builder
  17. # flask requires SIGINT to stop gracefully
  18. # (default stop signal from Compose is SIGTERM)
  19. stop_signal: SIGINT
  20. environment:
  21. - FLASK_SERVER_PORT=9091
  22. volumes:
  23. - ./flask:/src
  24. depends_on:
  25. - mongo
  26. mongo:
  27. image: mongo