-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
58 lines (56 loc) · 1.32 KB
/
docker-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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
version: "3"
services:
app-web:
build:
context: ./app
dockerfile: Dockerfile-web
image: twihaialert-app-web:latest
restart: always
env_file:
- ./.env
depends_on:
- db
app-task:
build:
context: ./app
dockerfile: Dockerfile-task
image: twihaialert-app-task:latest
env_file:
- ./.env
depends_on:
- db
proxy:
image: "caddy:2.1.1-alpine"
restart: always
ports:
- "80:80"
- "443:443"
volumes:
- ./proxy/Caddyfile:/etc/caddy/Caddyfile
- proxy-data:/data
environment:
TZ: "Asia/Tokyo"
depends_on:
- app-web
db:
image: mysql:5.7.30
restart: always
ports:
- "127.0.0.1:3306:3306"
volumes:
- db-data:/var/lib/mysql
- ./db/twihaialert.cnf:/etc/mysql/conf.d/twihaialert.cnf
environment:
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
MYSQL_DATABASE: ${twihaialert_db_name}
MYSQL_USER: ${twihaialert_db_user}
MYSQL_PASSWORD: ${twihaialert_db_password}
TZ: "Asia/Tokyo"
flyway:
image: flyway/flyway
command: -url=jdbc:mysql://db:3306 -schemas=${twihaialert_db_name} -user=${twihaialert_db_user} -password=${twihaialert_db_password} -connectRetries=60 migrate
volumes:
- ./flyway/sql:/flyway/sql
volumes:
db-data:
proxy-data: