docker-compose.yml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. version: '3.7'
  2. services:
  3. # Documentation : https://docs.docker.com/samples/library/mongo/
  4. mongo:
  5. container_name: mongo
  6. image: mongo
  7. restart: always
  8. volumes:
  9. - type: bind
  10. source: ./data
  11. target: /data/db
  12. read_only: false
  13. ports:
  14. - "27017:27017"
  15. networks:
  16. - backend
  17. backapp:
  18. container_name: backapp
  19. build:
  20. context: .
  21. dockerfile: back.Dockerfile
  22. image: backapp
  23. ports:
  24. - "${PORT:-5000}:5000"
  25. environment:
  26. NODE_ENV: "production"
  27. SERVE_CLIENT: "${SERVE_CLIENT:-true}"
  28. PORT: "5000"
  29. MONGO_URI: "${MONGO_URI:-mongodb://mongo:27017/sin3d}"
  30. links:
  31. - mongo
  32. volumes:
  33. - "${IMAGES_PATH:-./images}:/usr/src/app/images"
  34. - "./results:/usr/src/app/results"
  35. - "./logs:/usr/src/app/logs"
  36. depends_on:
  37. - mongo
  38. networks:
  39. - backend
  40. networks:
  41. backend: