mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
90 lines
2.1 KiB
YAML
90 lines
2.1 KiB
YAML
version: '3'
|
|
services:
|
|
cypress:
|
|
build:
|
|
context: .
|
|
dockerfile: tests/Dockerfile
|
|
networks:
|
|
- internal
|
|
volumes:
|
|
- ./tests:/e2e/tests
|
|
environment:
|
|
- BASE_URL=http://app-test
|
|
- TESTING_USERNAME=alex
|
|
- TESTING_PASSWORD=Alex1234
|
|
# - DEBUG=cypress:*
|
|
depends_on:
|
|
- app-test
|
|
|
|
app-test:
|
|
image: linuxodyssey/app
|
|
build:
|
|
context: .
|
|
dockerfile: app/Dockerfile
|
|
target: prod
|
|
networks:
|
|
internal:
|
|
# Only open the port for debugging
|
|
# ports:
|
|
# - 5173:80
|
|
depends_on:
|
|
- backend
|
|
|
|
backend:
|
|
image: linuxodyssey/backend
|
|
build:
|
|
context: .
|
|
dockerfile: server/Dockerfile
|
|
target: prod
|
|
depends_on:
|
|
- db-test
|
|
networks:
|
|
- internal
|
|
- players
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- ./logs:/app/logs
|
|
environment:
|
|
- BASE_URL=http://app-test
|
|
- MONGO_URL=mongodb://user:user-password@db-test:27017/odyssey-test
|
|
- DOCKER_NETWORK=linux-odyssey-players
|
|
- SECRET_KEY=b1d2e917-17b9-4fce-9055-082dee6ec5d6 # Only for testing
|
|
- 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}
|
|
- NODE_ENV=development
|
|
- TESTING=true
|
|
- TESTING_USERNAME=alex
|
|
- TESTING_PASSWORD=Alex1234
|
|
- BACKEND_URL=http://backend:3000
|
|
|
|
db-test:
|
|
image: mongo
|
|
networks:
|
|
- internal
|
|
volumes:
|
|
- ./mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
|
|
environment:
|
|
- MONGO_INITDB_ROOT_USERNAME=admin
|
|
- MONGO_INITDB_ROOT_PASSWORD=admin-password
|
|
- MONGO_USER=user
|
|
- MONGO_PASS=user-password
|
|
- MONGO_DB=odyssey-test
|
|
# ports:
|
|
# - 27017:27017
|
|
|
|
base:
|
|
image: linuxodyssey/quest-base
|
|
build:
|
|
context: .
|
|
dockerfile: ./quests/Dockerfile
|
|
|
|
networks:
|
|
internal:
|
|
players:
|
|
name: linux-odyssey-players
|
|
internal: true
|