compose.yml 3.0 KB

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