mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-05 19:20:12 +08:00
84 lines
1.8 KiB
YAML
84 lines
1.8 KiB
YAML
version: '3'
|
|
services:
|
|
app:
|
|
image: lancatlin/linux-odyssey:app
|
|
build:
|
|
context: .
|
|
dockerfile: app/Dockerfile
|
|
networks:
|
|
internal:
|
|
ports:
|
|
- 8080:80
|
|
backend:
|
|
image: lancatlin/linux-odyssey:backend
|
|
restart: on-failure
|
|
build:
|
|
context: .
|
|
dockerfile: server/Dockerfile
|
|
networks:
|
|
- internal
|
|
- players
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
- MONGO_URL=mongodb://user:user-password@db:27017/odyssey-test
|
|
- DOCKER_NETWORK=linux-odyssey-players
|
|
|
|
analytics:
|
|
image: lancatlin/linux-odyssey:analytics
|
|
build:
|
|
context: .
|
|
dockerfile: packages/analytics/Dockerfile
|
|
depends_on:
|
|
- db
|
|
networks:
|
|
- internal
|
|
ports:
|
|
- '3001:3001'
|
|
environment:
|
|
- MONGO_URL=mongodb://user:user-password@db:27017/odyssey-test
|
|
|
|
db:
|
|
image: mongo
|
|
restart: always
|
|
networks:
|
|
- internal
|
|
ports:
|
|
- '27017:27017'
|
|
volumes:
|
|
- mongo:/data/db
|
|
- ./mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
|
|
environment:
|
|
- BASE_URL=${BASE_URL}
|
|
- MONGO_INITDB_ROOT_USERNAME=admin
|
|
- MONGO_INITDB_ROOT_PASSWORD=admin-password
|
|
- MONGO_USER=user
|
|
- MONGO_PASS=user-password
|
|
- MONGO_DB=odyssey-test
|
|
- GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID}
|
|
- GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET}
|
|
- GITHUB_CLIENT_ID=${GITHUB_CLIENT_ID}
|
|
- GITHUB_CLIENT_SECRET=${GITHUB_CLIENT_SECRET}
|
|
|
|
base:
|
|
image: lancatlin/linux-odyssey:base
|
|
build:
|
|
context: .
|
|
dockerfile: ./quests/Dockerfile
|
|
|
|
helloworld:
|
|
image: lancatlin/linux-odyssey:helloworld
|
|
build:
|
|
context: .
|
|
dockerfile: quests/helloworld/Dockerfile
|
|
|
|
networks:
|
|
internal:
|
|
players:
|
|
name: linux-odyssey-players
|
|
|
|
volumes:
|
|
mongo:
|