-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
79 lines (73 loc) · 2.23 KB
/
docker-compose.yml
File metadata and controls
79 lines (73 loc) · 2.23 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
services:
mysql-dev:
image: "mysql:8.4"
container_name: "mysql-dev"
ports:
- "3306:3306"
command: --mysql-native-password=ON
environment:
MYSQL_ROOT_PASSWORD: "password"
MYSQL_DATABASE: "mydb"
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-uroot", "-ppassword"]
interval: 3s
timeout: 5s
retries: 30
postgres-dev:
image: "postgres:17"
container_name: "postgres-dev"
ports:
- "5432:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 3s
timeout: 5s
retries: 30
flyway:
image: flyway/flyway:12-alpine
container_name: "flyway"
command: ["-url=jdbc:mysql://mysql-dev:3306/mydb?allowPublicKeyRetrieval=true&useSsl=false", "-user=root", "-password=password", "-connectRetries=60", "migrate"]
volumes:
- ./dbschema:/flyway/sql
depends_on:
mysql-dev:
condition: service_healthy
sqlite-flyway:
image: flyway/flyway:12-alpine
container_name: "sqlite_flyway"
command: -url=jdbc:sqlite:/flyway/db/mydb.db migrate
volumes:
- .:/flyway/db
- ./sqlite-migrations:/flyway/sql
sqlite-attached-flyway:
image: flyway/flyway:12-alpine
container_name: "sqlite_attached_flyway"
command: -url=jdbc:sqlite:/flyway/db/users.db migrate
volumes:
- .:/flyway/db
- ./sqlite-attached-migrations:/flyway/sql
postgres-flyway:
image: flyway/flyway:12-alpine
container_name: "postgres_flyway"
command: -url=jdbc:postgresql://postgres-dev:5432/postgres -schemas=public -user=postgres -password=password -connectRetries=60 migrate
volumes:
- ./migrations/postgres:/flyway/sql
depends_on:
postgres-dev:
condition: service_healthy
migrate:
image: alpine:3
container_name: "typesql_migrate"
command: ["true"]
depends_on:
flyway:
condition: service_completed_successfully
postgres-flyway:
condition: service_completed_successfully
sqlite-flyway:
condition: service_completed_successfully
sqlite-attached-flyway:
condition: service_completed_successfully