-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
47 lines (41 loc) · 938 Bytes
/
docker-compose.yml
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
46
services:
webapp:
image: sennedemaegd/webapp
ports:
- "3000:3000"
environment:
- MYSQL_URL=mysql://Senne:Demaegd@database:3306/animals
depends_on:
database:
condition: service_healthy
healthcheck:
test: ["CMD", "echo", "hello"]
interval: 15s
timeout: 5s
retries: 5
database:
image: mysql:8.0.33
environment:
MYSQL_ROOT_PASSWORD: "mysql"
MYSQL_DATABASE: animals
MYSQL_USER: Senne
MYSQL_PASSWORD: Demaegd
volumes:
- mysql-data:/var/lib/mysql
ports:
- "3307:3306"
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 5s
timeout: 3s
retries: 5
test:
image: sennedemaegd/webapp
environment:
- API_URL=http://webapp:3000
depends_on:
webapp:
condition: service_healthy
command: ["yarn", "test"]
volumes:
mysql-data: