docker-compose.yml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. networks:
  27. - backend
  28. - proxy
  29. stdin_open: true
  30. tty: true
  31. frontend:
  32. build:
  33. context: .
  34. dockerfile: ./Dockerfile
  35. target: frontend
  36. args:
  37. FRONTEND_PROD_DEVTOOLS: "${FRONTEND_PROD_DEVTOOLS:-false}"
  38. MUSARE_SITENAME: "${MUSARE_SITENAME:-Musare}"
  39. MUSARE_PRIMARY_COLOR: "${MUSARE_PRIMARY_COLOR:-#03a9f4}"
  40. MUSARE_DEBUG_VERSION: "${MUSARE_DEBUG_VERSION:-true}"
  41. MUSARE_DEBUG_GIT_REMOTE: "${MUSARE_DEBUG_GIT_REMOTE:-false}"
  42. MUSARE_DEBUG_GIT_REMOTE_URL: "${MUSARE_DEBUG_GIT_REMOTE_URL:-false}"
  43. MUSARE_DEBUG_GIT_BRANCH: ${MUSARE_DEBUG_GIT_BRANCH:-true}
  44. MUSARE_DEBUG_GIT_LATEST_COMMIT: "${MUSARE_DEBUG_GIT_LATEST_COMMIT:-true}"
  45. MUSARE_DEBUG_GIT_LATEST_COMMIT_SHORT: "${MUSARE_DEBUG_GIT_LATEST_COMMIT_SHORT:-true}"
  46. restart: unless-stopped
  47. links:
  48. - backend
  49. networks:
  50. - proxy
  51. mongo:
  52. image: docker.io/mongo:${MONGO_VERSION}
  53. restart: unless-stopped
  54. environment:
  55. - MONGO_INITDB_ROOT_USERNAME=admin
  56. - MONGO_INITDB_ROOT_PASSWORD=${MONGO_ROOT_PASSWORD}
  57. - MONGO_INITDB_DATABASE=musare
  58. - MONGO_ROOT_PASSWORD=${MONGO_ROOT_PASSWORD}
  59. - MONGO_USER_USERNAME=${MONGO_USER_USERNAME}
  60. - MONGO_USER_PASSWORD=${MONGO_USER_PASSWORD}
  61. networks:
  62. - backend
  63. volumes:
  64. - ./tools/docker/setup-mongo.sh:/docker-entrypoint-initdb.d/setup-mongo.sh
  65. - database:/data/db
  66. redis:
  67. image: docker.io/redis:7
  68. restart: unless-stopped
  69. command: "--notify-keyspace-events Ex --requirepass ${REDIS_PASSWORD} --appendonly yes"
  70. networks:
  71. - backend
  72. volumes:
  73. - cache:/data
  74. networks:
  75. proxy:
  76. backend:
  77. volumes:
  78. database:
  79. cache: