-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
37 lines (36 loc) · 1.17 KB
/
docker-compose.yml
File metadata and controls
37 lines (36 loc) · 1.17 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
version: "3" # composeファイルのバージョン
services:
app:
# サービス名
build: . # ビルドに使うDockerfileの場所
tty: true # コンテナの永続化
ports:
# ホストOSのポートとコンテナのポートをつなげる
- "80:80"
depends_on:
mysql:
condition: service_healthy
mysql:
build: ./mysql/
# volumes:
# # 初期データを投入するSQLが格納されているdir
# - ./mysql/init:/docker-entrypoint-initdb.d
# # 永続化するときにマウントするdir
# - ./mysql/data:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=golang
# ports:
- "3306:3306"
container_name: kann-dev-db-container
healthcheck:
test:
[
"CMD",
"mysqladmin",
"ping",
"-h",
"localhost",
"-uroot",
"-pgolang" # "mysql --defaults-extra-file=/dbaccess.cnf"
]
retries: 3