-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
104 lines (98 loc) · 2.71 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
104 lines (98 loc) · 2.71 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
services:
# リバースプロキシけんWeサーバ
nginx:
hostname: nginx
image: nginx:latest
ports:
- 8350:8443
restart: always
tty: true
volumes:
- ./nginx/configs:/etc/nginx/conf.d/
- ./nginx/keys:/etc/nginx/keys
- ./nginx/statics:/etc/nginx/static/statics
# 認証用コンテナ
auth:
hostname: auth
image: mattuu0/authbase-auth:0.2.4
env_file:
- ./openssl/jwtKeys/private.env
- ./config/auth.env
volumes:
# - ./auth/src:/root/src
- ./auth/icons:/assets/icons
restart: always
depends_on:
migrate:
condition: service_completed_successfully
# アプリコンテナ
app:
hostname: app
build:
context: ./app
dockerfile: Dockerfile
target: Develop
tty: true
env_file:
- ./openssl/jwtKeys/public.env
- ./config/app.env
volumes:
- ./app/src:/root/src
restart: always
depends_on:
mysql:
condition: service_healthy
auth:
condition: service_started
# locationコンテナ
location:
hostname: location
build:
context: ./location
dockerfile: Dockerfile
target: Develop
# tty: true
env_file:
- ./openssl/jwtKeys/public.env
- ./config/location.env
volumes:
- ./location/src:/root/src
restart: always
depends_on:
auth:
condition: service_started
app:
condition: service_started
redis:
condition: service_started
# データベース
mysql:
hostname: db
image: mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: root
TZ: Asia/Tokyo
volumes:
- dbdata:/var/lib/mysql
- ./database/my.cnf:/etc/mysql/conf.d/my.cnf
- ./database/script/init.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "db", "-u", "root", "-proot"]
interval: 5s
timeout: 10s
retries: 5
# 認証用マイグレーション用コンテナ
migrate:
image: mattuu0/authbase-auth:0.2.4
env_file:
- ./config/auth.env
command: ["/auth","migrate","-r"]
redis:
hostname: redis
image: redis:latest
restart: always
ports:
- 6379:6379
volumes:
dbdata: