123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- version: "3.8"
- services:
- backend:
- build:
- context: .
- dockerfile: ./backend/Dockerfile
- target: musare_backend
- args:
- BACKEND_MODE: "${BACKEND_MODE:-production}"
- restart: ${RESTART_POLICY:-unless-stopped}
- volumes:
- - ./backend/config:/opt/app/config
- environment:
- - BACKEND_MODE=${BACKEND_MODE:-production}
- - CONTAINER_MODE=${CONTAINER_MODE:-production}
- - MUSARE_SITENAME=${MUSARE_SITENAME:-Musare}
- - MUSARE_PRIMARY_COLOR=${MUSARE_PRIMARY_COLOR:-#03a9f4}
- - MUSARE_DEBUG_VERSION=${MUSARE_DEBUG_VERSION:-true}
- - MUSARE_DEBUG_GIT_REMOTE=${MUSARE_DEBUG_GIT_REMOTE:-false}
- - MUSARE_DEBUG_GIT_REMOTE_URL=${MUSARE_DEBUG_GIT_REMOTE_URL:-false}
- - MUSARE_DEBUG_GIT_BRANCH=${MUSARE_DEBUG_GIT_BRANCH:-true}
- - MUSARE_DEBUG_GIT_LATEST_COMMIT=${MUSARE_DEBUG_GIT_LATEST_COMMIT:-true}
- - MUSARE_DEBUG_GIT_LATEST_COMMIT_SHORT=${MUSARE_DEBUG_GIT_LATEST_COMMIT_SHORT:-true}
- - MONGO_USER_USERNAME=${MONGO_USER_USERNAME}
- - MONGO_USER_PASSWORD=${MONGO_USER_PASSWORD}
- - REDIS_PASSWORD=${REDIS_PASSWORD}
- links:
- - mongo
- - redis
- stdin_open: true
- tty: true
- logging:
- driver: "json-file"
- options:
- max-size: "1m"
- max-file: "3"
- frontend:
- build:
- context: .
- dockerfile: ./frontend/Dockerfile
- target: musare_frontend
- args:
- FRONTEND_MODE: "${FRONTEND_MODE:-production}"
- FRONTEND_PROD_DEVTOOLS: "${FRONTEND_PROD_DEVTOOLS:-false}"
- MUSARE_SITENAME: "${MUSARE_SITENAME:-Musare}"
- MUSARE_PRIMARY_COLOR: "${MUSARE_PRIMARY_COLOR:-#03a9f4}"
- MUSARE_DEBUG_VERSION: "${MUSARE_DEBUG_VERSION:-true}"
- MUSARE_DEBUG_GIT_REMOTE: "${MUSARE_DEBUG_GIT_REMOTE:-false}"
- MUSARE_DEBUG_GIT_REMOTE_URL: "${MUSARE_DEBUG_GIT_REMOTE_URL:-false}"
- MUSARE_DEBUG_GIT_BRANCH: ${MUSARE_DEBUG_GIT_BRANCH:-true}
- MUSARE_DEBUG_GIT_LATEST_COMMIT: "${MUSARE_DEBUG_GIT_LATEST_COMMIT:-true}"
- MUSARE_DEBUG_GIT_LATEST_COMMIT_SHORT: "${MUSARE_DEBUG_GIT_LATEST_COMMIT_SHORT:-true}"
- restart: ${RESTART_POLICY:-unless-stopped}
- user: root
- ports:
- - "${FRONTEND_HOST:-0.0.0.0}:${FRONTEND_PORT:-80}:80"
- environment:
- - CONTAINER_MODE=${CONTAINER_MODE:-production}
- - FRONTEND_MODE=${FRONTEND_MODE:-production}
- - FRONTEND_PORT=${FRONTEND_PORT:-80}
- - FRONTEND_CLIENT_PORT=${FRONTEND_CLIENT_PORT:-80}
- - FRONTEND_DEV_PORT=${FRONTEND_DEV_PORT:-81}
- - FRONTEND_PROD_DEVTOOLS=${FRONTEND_PROD_DEVTOOLS:-false}
- - MUSARE_SITENAME=${MUSARE_SITENAME:-Musare}
- - MUSARE_PRIMARY_COLOR=${MUSARE_PRIMARY_COLOR:-#03a9f4}
- - MUSARE_DEBUG_VERSION=${MUSARE_DEBUG_VERSION:-true}
- - MUSARE_DEBUG_GIT_REMOTE=${MUSARE_DEBUG_GIT_REMOTE:-false}
- - MUSARE_DEBUG_GIT_REMOTE_URL=${MUSARE_DEBUG_GIT_REMOTE_URL:-false}
- - MUSARE_DEBUG_GIT_BRANCH=${MUSARE_DEBUG_GIT_BRANCH:-true}
- - MUSARE_DEBUG_GIT_LATEST_COMMIT=${MUSARE_DEBUG_GIT_LATEST_COMMIT:-true}
- - MUSARE_DEBUG_GIT_LATEST_COMMIT_SHORT=${MUSARE_DEBUG_GIT_LATEST_COMMIT_SHORT:-true}
- links:
- - backend
- logging:
- driver: "json-file"
- options:
- max-size: "1m"
- max-file: "3"
- mongo:
- image: docker.io/mongo:${MONGO_VERSION}
- restart: ${RESTART_POLICY:-unless-stopped}
- environment:
- - MONGO_INITDB_ROOT_USERNAME=admin
- - MONGO_INITDB_ROOT_PASSWORD=${MONGO_ROOT_PASSWORD}
- - MONGO_INITDB_DATABASE=musare
- - MONGO_PORT=${MONGO_PORT:-27017}
- - MONGO_ROOT_PASSWORD=${MONGO_ROOT_PASSWORD}
- - MONGO_USER_USERNAME=${MONGO_USER_USERNAME}
- - MONGO_USER_PASSWORD=${MONGO_USER_PASSWORD}
- volumes:
- - ./tools/docker/setup-mongo.sh:/docker-entrypoint-initdb.d/setup-mongo.sh
- - ${MONGO_DATA_LOCATION:-./db}:/data/db
- logging:
- driver: "json-file"
- options:
- max-size: "1m"
- max-file: "3"
- redis:
- image: docker.io/redis:7
- restart: ${RESTART_POLICY:-unless-stopped}
- command: "--notify-keyspace-events Ex --requirepass ${REDIS_PASSWORD} --appendonly yes"
- volumes:
- - /data
- logging:
- driver: "json-file"
- options:
- max-size: "1m"
- max-file: "3"
|