-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatabase-docker-compose.yaml
More file actions
45 lines (43 loc) · 1.16 KB
/
Copy pathdatabase-docker-compose.yaml
File metadata and controls
45 lines (43 loc) · 1.16 KB
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
44
45
services:
mysql:
container_name: database
image: ghcr.io/maxones25/studien_generator_app/test-database:latest
command:
[
"--character-set-server=utf8mb4",
"--collation-server=utf8mb4_unicode_ci",
]
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=studien_generator_app
ports:
- 3306:3306
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1"]
start_period: 30s
interval: 10s
timeout: 30s
retries: 3
networks:
- study-app-network
test-setup:
container_name: test-setup
image: ghcr.io/maxones25/studien_generator_app/test-setup:latest
depends_on:
mysql:
condition: service_healthy
environment:
- DB_HOST=mysql
- DB_USER=root
- DB_PASSWORD=root
- DB_NAME=studien_generator_app
command: sh -c "npm run db:migration:run && npm run db:seed:run && touch /usr/src/app/.healthcheck"
healthcheck:
test: ["CMD-SHELL", "[ -f /usr/src/app/.healthcheck ] || exit 1"]
interval: 30s
timeout: 30s
retries: 3
networks:
- study-app-network
networks:
study-app-network: