docker-compose.yml 995 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. version: '3'
  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. - "./data:/data/db" # get access to database files
  10. ports:
  11. - "27017:27017"
  12. networks:
  13. - backend
  14. backapp:
  15. container_name: backapp
  16. build:
  17. context: .
  18. dockerfile: back.Dockerfile
  19. image: backapp
  20. ports:
  21. - "${PORT:-5000}:5000"
  22. environment:
  23. NODE_ENV: "production"
  24. SERVE_CLIENT: "${SERVE_CLIENT:-true}"
  25. PORT: "5000"
  26. MONGO_URI: "${MONGO_URI:-mongodb://mongo:27017/sin3d}"
  27. links:
  28. - mongo
  29. volumes:
  30. - "${IMAGES_PATH:-./images}:/usr/src/app/images"
  31. - "./logs:/usr/src/app/logs"
  32. depends_on:
  33. - mongo
  34. networks:
  35. - backend
  36. networks:
  37. backend: