compose.yml 2.6 KB

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