compose.yml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. services:
  2. server:
  3. build:
  4. context: .
  5. dockerfile: ./Dockerfile
  6. target: server
  7. restart: unless-stopped
  8. volumes:
  9. - ./server/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. - POSTGRES_USERNAME=${POSTGRES_USERNAME}
  20. - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
  21. links:
  22. - postgres
  23. networks:
  24. - backend
  25. - proxy
  26. stdin_open: true
  27. tty: true
  28. postgres:
  29. image: postgres
  30. restart: unless-stopped
  31. networks:
  32. - backend
  33. environment:
  34. - POSTGRES_DB=musare
  35. - POSTGRES_USER=${POSTGRES_USERNAME}
  36. - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
  37. volumes:
  38. - pgdata:/var/lib/postgresql/data
  39. backend:
  40. build:
  41. context: .
  42. dockerfile: ./Dockerfile
  43. target: backend
  44. restart: unless-stopped
  45. volumes:
  46. - ./backend/config:/opt/app/config
  47. environment:
  48. - MUSARE_SITENAME=${MUSARE_SITENAME:-Musare}
  49. - MUSARE_PRIMARY_COLOR=${MUSARE_PRIMARY_COLOR:-#03a9f4}
  50. - MUSARE_DEBUG_VERSION=${MUSARE_DEBUG_VERSION:-true}
  51. - MUSARE_DEBUG_GIT_REMOTE=${MUSARE_DEBUG_GIT_REMOTE:-false}
  52. - MUSARE_DEBUG_GIT_REMOTE_URL=${MUSARE_DEBUG_GIT_REMOTE_URL:-false}
  53. - MUSARE_DEBUG_GIT_BRANCH=${MUSARE_DEBUG_GIT_BRANCH:-true}
  54. - MUSARE_DEBUG_GIT_LATEST_COMMIT=${MUSARE_DEBUG_GIT_LATEST_COMMIT:-true}
  55. - MUSARE_DEBUG_GIT_LATEST_COMMIT_SHORT=${MUSARE_DEBUG_GIT_LATEST_COMMIT_SHORT:-true}
  56. - MONGO_USER_USERNAME=${MONGO_USER_USERNAME}
  57. - MONGO_USER_PASSWORD=${MONGO_USER_PASSWORD}
  58. - REDIS_PASSWORD=${REDIS_PASSWORD}
  59. links:
  60. - mongo
  61. - redis
  62. networks:
  63. - backend
  64. - proxy
  65. stdin_open: true
  66. tty: true
  67. frontend:
  68. build:
  69. context: .
  70. dockerfile: ./Dockerfile
  71. target: frontend
  72. args:
  73. FRONTEND_PROD_DEVTOOLS: "${FRONTEND_PROD_DEVTOOLS:-false}"
  74. MUSARE_SITENAME: "${MUSARE_SITENAME:-Musare}"
  75. MUSARE_PRIMARY_COLOR: "${MUSARE_PRIMARY_COLOR:-#03a9f4}"
  76. MUSARE_DEBUG_VERSION: "${MUSARE_DEBUG_VERSION:-true}"
  77. MUSARE_DEBUG_GIT_REMOTE: "${MUSARE_DEBUG_GIT_REMOTE:-false}"
  78. MUSARE_DEBUG_GIT_REMOTE_URL: "${MUSARE_DEBUG_GIT_REMOTE_URL:-false}"
  79. MUSARE_DEBUG_GIT_BRANCH: ${MUSARE_DEBUG_GIT_BRANCH:-true}
  80. MUSARE_DEBUG_GIT_LATEST_COMMIT: "${MUSARE_DEBUG_GIT_LATEST_COMMIT:-true}"
  81. MUSARE_DEBUG_GIT_LATEST_COMMIT_SHORT: "${MUSARE_DEBUG_GIT_LATEST_COMMIT_SHORT:-true}"
  82. restart: unless-stopped
  83. links:
  84. - backend
  85. networks:
  86. - proxy
  87. mongo:
  88. image: docker.io/mongo:${MONGO_VERSION}
  89. restart: unless-stopped
  90. environment:
  91. - MONGO_INITDB_ROOT_USERNAME=admin
  92. - MONGO_INITDB_ROOT_PASSWORD=${MONGO_ROOT_PASSWORD}
  93. - MONGO_INITDB_DATABASE=musare
  94. - MONGO_ROOT_PASSWORD=${MONGO_ROOT_PASSWORD}
  95. - MONGO_USER_USERNAME=${MONGO_USER_USERNAME}
  96. - MONGO_USER_PASSWORD=${MONGO_USER_PASSWORD}
  97. networks:
  98. - backend
  99. volumes:
  100. - ./tools/docker/setup-mongo.sh:/docker-entrypoint-initdb.d/setup-mongo.sh
  101. - database:/data/db
  102. redis:
  103. image: docker.io/redis:7
  104. restart: unless-stopped
  105. command: "--notify-keyspace-events Ex --requirepass ${REDIS_PASSWORD} --appendonly yes"
  106. networks:
  107. - backend
  108. volumes:
  109. - cache:/data
  110. networks:
  111. proxy:
  112. backend:
  113. volumes:
  114. pgdata:
  115. database:
  116. cache: