-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
68 lines (65 loc) 路 1.81 KB
/
Copy pathcompose.yaml
File metadata and controls
68 lines (65 loc) 路 1.81 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
services:
nginx:
image: nginx:1.29.4-alpine3.23
restart: unless-stopped
ports:
- 80:80
- 443:443
healthcheck:
test: ["CMD-SHELL", "nginx -t || exit 1"]
interval: 10s
timeout: 3s
start_period: 10s
start_interval: 1s
retries: 3
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
networks:
- internal
depends_on:
sakurator:
condition: service_started
sakurator:
build: .
networks:
- internal
secrets:
- mysql-hostname
- mysql-password
- mysql-database
environment:
- DATABASE_URL=mysql://root:${MYSQL_PASSWORD}@${MYSQL_HOSTNAME}:3306/${MYSQL_DATABASE}
- MYSQL_HOSTNAME=${MYSQL_HOSTNAME}
- MYSQL_USERNAME=${MYSQL_USERNAME}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
depends_on:
mysql:
condition: service_healthy
mysql:
image: mysql:9.7.0
volumes:
- mysql-data:/var/lib/mysql
networks:
- internal
environment:
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/mysql-password
- MYSQL_DATABASE_FILE=/run/secrets/mysql-database
secrets:
- mysql-password
- mysql-database
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 20s
retries: 10
secrets:
mysql-hostname:
environment: MYSQL_HOSTNAME
mysql-password:
environment: MYSQL_PASSWORD
mysql-database:
environment: MYSQL_DATABASE
volumes:
mysql-data:
networks:
internal: