docker-compose.yml 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. version: "3.8"
  2. services:
  3. backend:
  4. build:
  5. context: .
  6. dockerfile: ./Dockerfile
  7. target: backend
  8. restart: unless-stopped
  9. volumes:
  10. - ./backend/config:/opt/app/config
  11. environment:
  12. - MUSARE_SITENAME=${MUSARE_SITENAME:-Musare}
  13. - MUSARE_PRIMARY_COLOR=${MUSARE_PRIMARY_COLOR:-#03a9f4}
  14. - MUSARE_DEBUG_VERSION=${MUSARE_DEBUG_VERSION:-true}
  15. - MUSARE_DEBUG_GIT_REMOTE=${MUSARE_DEBUG_GIT_REMOTE:-false}
  16. - MUSARE_DEBUG_GIT_REMOTE_URL=${MUSARE_DEBUG_GIT_REMOTE_URL:-false}
  17. - MUSARE_DEBUG_GIT_BRANCH=${MUSARE_DEBUG_GIT_BRANCH:-true}
  18. - MUSARE_DEBUG_GIT_LATEST_COMMIT=${MUSARE_DEBUG_GIT_LATEST_COMMIT:-true}
  19. - MUSARE_DEBUG_GIT_LATEST_COMMIT_SHORT=${MUSARE_DEBUG_GIT_LATEST_COMMIT_SHORT:-true}
  20. - MONGO_USER_USERNAME=${MONGO_USER_USERNAME}
  21. - MONGO_USER_PASSWORD=${MONGO_USER_PASSWORD}
  22. - REDIS_PASSWORD=${REDIS_PASSWORD}
  23. links:
  24. - mongo
  25. - redis
  26. stdin_open: true
  27. tty: true
  28. frontend:
  29. build:
  30. context: .
  31. dockerfile: ./Dockerfile
  32. target: frontend
  33. args:
  34. FRONTEND_PROD_DEVTOOLS: "${FRONTEND_PROD_DEVTOOLS:-false}"
  35. MUSARE_SITENAME: "${MUSARE_SITENAME:-Musare}"
  36. MUSARE_PRIMARY_COLOR: "${MUSARE_PRIMARY_COLOR:-#03a9f4}"
  37. MUSARE_DEBUG_VERSION: "${MUSARE_DEBUG_VERSION:-true}"
  38. MUSARE_DEBUG_GIT_REMOTE: "${MUSARE_DEBUG_GIT_REMOTE:-false}"
  39. MUSARE_DEBUG_GIT_REMOTE_URL: "${MUSARE_DEBUG_GIT_REMOTE_URL:-false}"
  40. MUSARE_DEBUG_GIT_BRANCH: ${MUSARE_DEBUG_GIT_BRANCH:-true}
  41. MUSARE_DEBUG_GIT_LATEST_COMMIT: "${MUSARE_DEBUG_GIT_LATEST_COMMIT:-true}"
  42. MUSARE_DEBUG_GIT_LATEST_COMMIT_SHORT: "${MUSARE_DEBUG_GIT_LATEST_COMMIT_SHORT:-true}"
  43. restart: unless-stopped
  44. links:
  45. - backend
  46. mongo:
  47. image: docker.io/mongo:${MONGO_VERSION}
  48. restart: unless-stopped
  49. environment:
  50. - MONGO_INITDB_ROOT_USERNAME=admin
  51. - MONGO_INITDB_ROOT_PASSWORD=${MONGO_ROOT_PASSWORD}
  52. - MONGO_INITDB_DATABASE=musare
  53. - MONGO_ROOT_PASSWORD=${MONGO_ROOT_PASSWORD}
  54. - MONGO_USER_USERNAME=${MONGO_USER_USERNAME}
  55. - MONGO_USER_PASSWORD=${MONGO_USER_PASSWORD}
  56. volumes:
  57. - ./tools/docker/setup-mongo.sh:/docker-entrypoint-initdb.d/setup-mongo.sh
  58. - database:/data/db
  59. redis:
  60. image: docker.io/redis:7
  61. restart: unless-stopped
  62. command: "--notify-keyspace-events Ex --requirepass ${REDIS_PASSWORD} --appendonly yes"
  63. volumes:
  64. - cache:/data
  65. volumes:
  66. database:
  67. cache: