-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yaml
43 lines (41 loc) · 1.09 KB
/
docker-compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
services:
danmaku-server:
build: .
restart: always
ports:
- "4394:4394"
environment:
- MONGODB_CONNECTION_STRING=${MONGODB_CONNECTION_STRING}
- JWT_SECRET=${JWT_SECRET}
- GITHUB_ACCESS_TOKEN=${GITHUB_ACCESS_TOKEN}
volumes:
- ./vol:/server/vol
depends_on:
danmaku-server-test:
condition: service_completed_successfully
danmaku-server-test:
build:
dockerfile: Dockerfile.test
command: ./gradlew clean :danmaku:ani:server:test
ports:
- "4394:4394"
environment:
- MONGODB_CONNECTION_STRING=mongodb://root:example@mongodb_test:27017
volumes:
- ./danmaku/ani/server/test-sandbox:/server/vol
depends_on:
test-mongo:
condition: service_healthy
test-mongo:
image: mongo:7
restart: always
ports:
- "27017:27017"
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=example
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
interval: 5s
timeout: 3s
retries: 5