docker-compose.yaml 506 B

1234567891011121314151617181920212223
  1. version: "3.7"
  2. services:
  3. web:
  4. image: nginx
  5. volumes:
  6. - ./nginx/nginx.conf:/tmp/nginx.conf
  7. environment:
  8. - FLASK_SERVER_ADDR=backend:9091
  9. command: /bin/bash -c "envsubst < /tmp/nginx.conf > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
  10. ports:
  11. - 80:80
  12. depends_on:
  13. - backend
  14. backend:
  15. build: flask
  16. environment:
  17. - FLASK_SERVER_PORT=9091
  18. volumes:
  19. - ./flask:/src
  20. depends_on:
  21. - mongo
  22. mongo:
  23. image: mongo