12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- version: "3.8"
- services:
- backend:
- build:
- context: ./backend
- target: musare_backend
- restart: ${RESTART_POLICY:-unless-stopped}
- volumes:
- - ./.git:/opt/app/.parent_git:ro
- - ./backend/config:/opt/app/config
- - ./@musare_types:/opt/@musare_types
- environment:
- - CONTAINER_MODE=${CONTAINER_MODE:-prod}
- links:
- - mongo
- - redis
- stdin_open: true
- tty: true
- frontend:
- build:
- context: ./frontend
- target: musare_frontend
- args:
- FRONTEND_MODE: "${FRONTEND_MODE:-prod}"
- restart: ${RESTART_POLICY:-unless-stopped}
- user: root
- ports:
- - "${FRONTEND_HOST:-0.0.0.0}:${FRONTEND_PORT:-80}:80"
- volumes:
- - ./.git:/opt/app/.parent_git:ro
- - ./frontend/dist/config:/opt/app/dist/config
- - ./@musare_types:/opt/@musare_types
- environment:
- - FRONTEND_MODE=${FRONTEND_MODE:-prod}
- - CONTAINER_MODE=${CONTAINER_MODE:-prod}
- links:
- - backend
- 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
- redis:
- image: docker.io/redis:6.2
- restart: ${RESTART_POLICY:-unless-stopped}
- command: "--notify-keyspace-events Ex --requirepass ${REDIS_PASSWORD} --appendonly yes"
- volumes:
- - /data
|