docker-compose.yml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. version: '3'
  2. services:
  3. backend:
  4. build: ./backend
  5. ports:
  6. - "${BACKEND_PORT}:8080"
  7. volumes:
  8. - ./backend:/opt/app
  9. - ./log:/opt/log
  10. links:
  11. - mongo
  12. - redis
  13. stdin_open: true
  14. tty: true
  15. frontend:
  16. build: ./frontend
  17. ports:
  18. - "${FRONTEND_PORT}:80"
  19. volumes:
  20. - ./frontend:/opt/app
  21. - /opt/app/node_modules/
  22. environment:
  23. - FRONTEND_MODE=${FRONTEND_MODE}
  24. mongo:
  25. image: mongo:4.0
  26. ports:
  27. - "${MONGO_PORT}:27017"
  28. environment:
  29. - MONGO_INITDB_ROOT_USERNAME=admin
  30. - MONGO_INITDB_ROOT_PASSWORD=${MONGO_ROOT_PASSWORD}
  31. - MONGO_INITDB_DATABASE=musare
  32. - MONGO_PORT=${MONGO_PORT}
  33. - MONGO_ROOT_PASSWORD=${MONGO_ROOT_PASSWORD}
  34. - MONGO_USER_USERNAME=${MONGO_USER_USERNAME}
  35. - MONGO_USER_PASSWORD=${MONGO_USER_PASSWORD}
  36. volumes:
  37. - ./tools/docker/setup-mongo.sh:/docker-entrypoint-initdb.d/setup-mongo.sh
  38. redis:
  39. image: redis
  40. command: "--notify-keyspace-events Ex --requirepass ${REDIS_PASSWORD} --appendonly yes"
  41. volumes:
  42. - .redis:/data
  43. ports:
  44. - "${REDIS_PORT}:6379"