docker-compose.yml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. version: '2'
  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. environment:
  14. - SNYK_TOKEN=${SNYK_TOKEN}
  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. - SNYK_TOKEN=${SNYK_TOKEN}
  25. mongo:
  26. image: mongo:4.0
  27. ports:
  28. - "${MONGO_PORT}:27017"
  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. mongoclient:
  40. image: mongoclient/mongoclient
  41. ports:
  42. - "${MONGOCLIENT_PORT}:3000"
  43. redis:
  44. image: redis
  45. command: "--notify-keyspace-events Ex --requirepass ${REDIS_PASSWORD}"
  46. volumes:
  47. - .redis:/data
  48. ports:
  49. - "${REDIS_PORT}:6379"