docker-compose.yml 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. - "./logs:/usr/src/app/logs"
  35. depends_on:
  36. - mongo
  37. networks:
  38. - backend
  39. networks:
  40. backend: