forked from halo-dev/halo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose-mysql.yaml
46 lines (46 loc) · 1.18 KB
/
compose-mysql.yaml
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
version: '3.1'
services:
testing:
build:
context: .
dockerfile: Dockerfile
links:
- halo
depends_on:
halo:
condition: service_healthy
halo:
image: ghcr.io/halo-dev/halo-dev:${TAG:-main}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8090/actuator/health/readiness"]
interval: 30s
timeout: 5s
retries: 5
start_period: 30s
command:
- --spring.r2dbc.url=r2dbc:pool:mysql://mysql:3306/halo
- --spring.r2dbc.username=root
- --spring.r2dbc.password=halo
- --spring.sql.init.platform=mysql
links:
- mysql
depends_on:
mysql:
condition: service_healthy
mysql:
image: mysql:8.1.0
container_name: mysql
restart: on-failure:3
command:
- --default-authentication-plugin=caching_sha2_password
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_general_ci
- --explicit_defaults_for_timestamp=true
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1", "--silent"]
interval: 10s
timeout: 5s
retries: 5
environment:
- MYSQL_ROOT_PASSWORD=halo
- MYSQL_DATABASE=halo