docker-compose.yml 1.2 KB

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