docker-compose.yml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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. logging:
  29. driver: "json-file"
  30. options:
  31. max-size: "1m"
  32. max-file: "3"
  33. frontend:
  34. build:
  35. context: .
  36. dockerfile: ./Dockerfile
  37. target: frontend
  38. args:
  39. FRONTEND_PROD_DEVTOOLS: "${FRONTEND_PROD_DEVTOOLS:-false}"
  40. MUSARE_SITENAME: "${MUSARE_SITENAME:-Musare}"
  41. MUSARE_PRIMARY_COLOR: "${MUSARE_PRIMARY_COLOR:-#03a9f4}"
  42. MUSARE_DEBUG_VERSION: "${MUSARE_DEBUG_VERSION:-true}"
  43. MUSARE_DEBUG_GIT_REMOTE: "${MUSARE_DEBUG_GIT_REMOTE:-false}"
  44. MUSARE_DEBUG_GIT_REMOTE_URL: "${MUSARE_DEBUG_GIT_REMOTE_URL:-false}"
  45. MUSARE_DEBUG_GIT_BRANCH: ${MUSARE_DEBUG_GIT_BRANCH:-true}
  46. MUSARE_DEBUG_GIT_LATEST_COMMIT: "${MUSARE_DEBUG_GIT_LATEST_COMMIT:-true}"
  47. MUSARE_DEBUG_GIT_LATEST_COMMIT_SHORT: "${MUSARE_DEBUG_GIT_LATEST_COMMIT_SHORT:-true}"
  48. restart: unless-stopped
  49. ports:
  50. - "${FRONTEND_HOST:-0.0.0.0}:${FRONTEND_PORT:-80}:80"
  51. environment:
  52. - FRONTEND_PORT=${FRONTEND_PORT:-80}
  53. - FRONTEND_CLIENT_PORT=${FRONTEND_CLIENT_PORT:-80}
  54. - FRONTEND_DEV_PORT=${FRONTEND_DEV_PORT:-81}
  55. - FRONTEND_PROD_DEVTOOLS=${FRONTEND_PROD_DEVTOOLS:-false}
  56. - MUSARE_SITENAME=${MUSARE_SITENAME:-Musare}
  57. - MUSARE_PRIMARY_COLOR=${MUSARE_PRIMARY_COLOR:-#03a9f4}
  58. - MUSARE_DEBUG_VERSION=${MUSARE_DEBUG_VERSION:-true}
  59. - MUSARE_DEBUG_GIT_REMOTE=${MUSARE_DEBUG_GIT_REMOTE:-false}
  60. - MUSARE_DEBUG_GIT_REMOTE_URL=${MUSARE_DEBUG_GIT_REMOTE_URL:-false}
  61. - MUSARE_DEBUG_GIT_BRANCH=${MUSARE_DEBUG_GIT_BRANCH:-true}
  62. - MUSARE_DEBUG_GIT_LATEST_COMMIT=${MUSARE_DEBUG_GIT_LATEST_COMMIT:-true}
  63. - MUSARE_DEBUG_GIT_LATEST_COMMIT_SHORT=${MUSARE_DEBUG_GIT_LATEST_COMMIT_SHORT:-true}
  64. links:
  65. - backend
  66. logging:
  67. driver: "json-file"
  68. options:
  69. max-size: "1m"
  70. max-file: "3"
  71. mongo:
  72. image: docker.io/mongo:${MONGO_VERSION}
  73. restart: unless-stopped
  74. environment:
  75. - MONGO_INITDB_ROOT_USERNAME=admin
  76. - MONGO_INITDB_ROOT_PASSWORD=${MONGO_ROOT_PASSWORD}
  77. - MONGO_INITDB_DATABASE=musare
  78. - MONGO_PORT=${MONGO_PORT:-27017}
  79. - MONGO_ROOT_PASSWORD=${MONGO_ROOT_PASSWORD}
  80. - MONGO_USER_USERNAME=${MONGO_USER_USERNAME}
  81. - MONGO_USER_PASSWORD=${MONGO_USER_PASSWORD}
  82. volumes:
  83. - ./tools/docker/setup-mongo.sh:/docker-entrypoint-initdb.d/setup-mongo.sh
  84. - ${MONGO_DATA_LOCATION:-./db}:/data/db
  85. logging:
  86. driver: "json-file"
  87. options:
  88. max-size: "1m"
  89. max-file: "3"
  90. redis:
  91. image: docker.io/redis:7
  92. restart: unless-stopped
  93. command: "--notify-keyspace-events Ex --requirepass ${REDIS_PASSWORD} --appendonly yes"
  94. volumes:
  95. - /data
  96. logging:
  97. driver: "json-file"
  98. options:
  99. max-size: "1m"
  100. max-file: "3"