-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yml
44 lines (42 loc) · 818 Bytes
/
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
services:
app:
container_name: app
build:
context: .
dockerfile: app.dockerfile
tty: true
ports:
- 8080:8080
depends_on:
db:
condition: service_healthy
volumes:
- .:/app
db:
container_name: db
build:
context: .
dockerfile: db.dockerfile
tty: true
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: "test"
MYSQL_USER: "tester"
MYSQL_PASSWORD: "password"
healthcheck:
test: "mysqladmin ping -h 127.0.0.1 -u root -p$$MYSQL_ROOT_PASSWORD"
timeout: 5s
interval: 5s
retries: 10
volumes:
- type: volume
source: mysql_data
target: /var/lib/mysql
networks:
- default
networks:
default:
volumes:
mysql_data: