-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
53 lines (52 loc) · 1.03 KB
/
docker-compose.yml
File metadata and controls
53 lines (52 loc) · 1.03 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
46
47
48
49
50
51
52
53
version: "3.9"
services:
mysql:
image: mysql:8.0.28
platform: linux/amd64
container_name: mysql-container
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: demo
TZ: "Asia/Tokyo"
volumes:
- mysql_data:/var/lib/mysql # MySQLデータの永続化
- ./my.cnf:/config/my.cnf
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 5s
timeout: 5s
retries: 5
test:
build:
context: .
dockerfile: Dockerfile
target: tester
tidy:
build:
context: .
dockerfile: Dockerfile
target: tidy
volumes:
- .:/app
swag:
build:
context: .
dockerfile: Dockerfile
target: swagger
volumes:
- .:/app
go:
build:
context: .
dockerfile: Dockerfile
environment:
- GO_ENV=production
ports:
- "8080:8080"
depends_on:
mysql:
condition: service_healthy
volumes:
mysql_data: # ボリュームの定義