docker-compose.yml 987 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. version: '3'
  2. services:
  3. # Documentation : https://docs.docker.com/samples/library/mongo/
  4. mongo:
  5. image: mongo
  6. restart: always
  7. environment:
  8. MONGO_INITDB_ROOT_USERNAME: common
  9. MONGO_INITDB_ROOT_PASSWORD: webexpe
  10. # TODO : Remove later if unecessary
  11. # MONGO_INITDB_DATABASE: webexpe
  12. # DATADIR: "${DATADIR:-data}"
  13. volumes:
  14. - "./data:/data/db" # get access to database files
  15. ports:
  16. - "27017:27017"
  17. backapp:
  18. build:
  19. context: .
  20. dockerfile: back.Dockerfile
  21. image: backapp
  22. ports:
  23. - "${PORT:-5000}:5000"
  24. environment:
  25. NODE_ENV: production
  26. SERVE_CLIENT: "${SERVE_CLIENT:-true}"
  27. PORT: "5000"
  28. volumes:
  29. - "${IMAGES_PATH:-./images}:/usr/src/app/images"
  30. - "./logs:/usr/src/app/logs"
  31. depends_on:
  32. - mongo