-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
53 lines (50 loc) · 988 Bytes
/
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
44
45
46
47
48
49
50
51
52
53
version: '3'
services:
api:
build:
context: .
dockerfile: build/api/Dockerfile.dev
container_name: api
depends_on:
db:
condition: service_healthy
env_file:
- .env
ports:
- target: 8080
published: 8080
protocol: TCP
mode: host
stdin_open: true
tty: true
volumes:
- type: bind
source: app
target: /go/src/app
db:
build:
context: .
dockerfile: build/db/Dockerfile
container_name: db
env_file:
- .env
healthcheck:
test: "mysqladmin ping -h 127.0.0.1 -uroot -p$$MYSQL_ROOT_PASSWORD"
interval: 1m30s
timeout: 30s
retries: 5
start_period: 30s
ports:
- target: 3306
published: 3306
protocol: TCP
mode: host
restart: always
volumes:
- type: volume
source: db-data
target: /var/lib/mysql
volume:
nocopy: true
volumes:
db-data: