-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
39 lines (37 loc) · 1.06 KB
/
docker-compose.yaml
File metadata and controls
39 lines (37 loc) · 1.06 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
services:
mysql:
image: mysql:8.0
environment:
MYSQL_DATABASE: auto_migration_sample
MYSQL_USER: sample
MYSQL_PASSWORD: W9VuhRXYZcdR33PDt8hUQuwFzCCxriWc
MYSQL_ROOT_PASSWORD: jQcKPf2zrLNSXf8sxGFyvK2AcNHT7nrn
TZ: Asia/shanghai
ports:
- 3400:3306
volumes:
- ./mysql-data:/var/lib/mysql
networks:
- auto-migration-sample-network
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost" ]
interval: 10s
timeout: 5s
retries: 3
liquibase:
build: ./migrations/liquibase
restart: "no"
depends_on:
mysql:
condition: service_healthy # 当数据库启动成功后再进行表结构变更
environment:
- DB_URL=jdbc:mysql://mysql/auto_migration_sample?allowPublicKeyRetrieval=true
- DB_USERNAME=sample
- DB_PASSWORD=W9VuhRXYZcdR33PDt8hUQuwFzCCxriWc
volumes:
- ./migrations/liquibase/changelog:/liquibase/changelog
networks:
- auto-migration-sample-network
networks:
auto-migration-sample-network:
driver: bridge