4
0

docker-compose.yaml 583 B

123456789101112131415161718192021222324252627
  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: dev-envs
  17. stop_signal: SIGINT
  18. environment:
  19. - FLASK_SERVER_PORT=9091
  20. volumes:
  21. - /var/run/docker.sock:/var/run/docker.sock
  22. depends_on:
  23. - mongo
  24. mongo:
  25. image: mongo