mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-05 19:20:12 +08:00
* feat: put survey and bug report url to backend * fix: centralize hardcoded url to config * fix: validate url before redirecting
96 lines
2.2 KiB
YAML
96 lines
2.2 KiB
YAML
version: '3'
|
|
services:
|
|
app:
|
|
image: lancatlin/linux-odyssey:app
|
|
depends_on:
|
|
- backend
|
|
build:
|
|
context: .
|
|
dockerfile: app/Dockerfile
|
|
target: prod
|
|
networks:
|
|
internal:
|
|
ports:
|
|
- 8080:80
|
|
backend:
|
|
image: lancatlin/linux-odyssey:backend
|
|
depends_on:
|
|
- db
|
|
restart: on-failure
|
|
build:
|
|
context: .
|
|
dockerfile: server/Dockerfile
|
|
target: prod
|
|
networks:
|
|
- internal
|
|
- players
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
- MONGO_URL=mongodb://${MONGO_USER}:${MONGO_PASSWORD}@db:27017/${MONGO_DB}
|
|
- DOCKER_NETWORK=linux-odyssey-players
|
|
- SECRET_KEY=${SECRET_KEY}
|
|
- TRUSTED_PROXIES=${TRUSTED_PROXIES}
|
|
|
|
analytics:
|
|
image: lancatlin/linux-odyssey:analytics
|
|
build:
|
|
context: .
|
|
dockerfile: packages/analytics/Dockerfile
|
|
target: prod
|
|
depends_on:
|
|
- db
|
|
networks:
|
|
- internal
|
|
ports:
|
|
- '3001:3001'
|
|
environment:
|
|
- MONGO_URL=mongodb://${MONGO_USER}:${MONGO_PASSWORD}@db:27017/${MONGO_DB}
|
|
|
|
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=${MONGO_ROOT_PASSWORD}
|
|
- MONGO_USER=${MONGO_USER}
|
|
- MONGO_PASS=${MONGO_PASSWORD}
|
|
- MONGO_DB=${MONGO_DB}
|
|
- GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID}
|
|
- GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET}
|
|
- GITHUB_CLIENT_ID=${GITHUB_CLIENT_ID}
|
|
- GITHUB_CLIENT_SECRET=${GITHUB_CLIENT_SECRET}
|
|
- SURVEY_URL=${SURVEY_URL}
|
|
- BUG_REPORT_URL=${BUG_REPORT_URL}
|
|
|
|
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
|
|
internal: true
|
|
|
|
volumes:
|
|
mongo:
|