This repository was archived by the owner on Mar 7, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
114 lines (107 loc) · 3.07 KB
/
docker-compose.yaml
File metadata and controls
114 lines (107 loc) · 3.07 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
services:
# PostgreSQL Test Database
postgres-test:
image: postgres:16
container_name: postgres-test
environment:
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpass
POSTGRES_DB: testdb
ports:
- "5433:5432"
volumes:
- pgdata-test:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U testuser -d testdb"]
interval: 5s
timeout: 5s
retries: 5
# MySQL Test Database
mysql-test:
image: mysql:8.0
container_name: mysql-test
environment:
MYSQL_ROOT_PASSWORD: rootpass
MYSQL_USER: testuser
MYSQL_PASSWORD: testpass
MYSQL_DATABASE: testdb
ports:
- "3307:3306"
volumes:
- mysqldata-test:/var/lib/mysql
command: ["mysqld", "--log-bin-trust-function-creators=1"]
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "testuser", "-ptestpass"]
interval: 5s
timeout: 5s
retries: 5
# SQLite Test Database (using Alpine with SQLite)
sqlite-test:
image: alpine:latest
container_name: sqlite-test
volumes:
- sqlitedata-test:/data
command: ["sh", "-c", "apk add --no-cache sqlite && tail -f /dev/null"]
healthcheck:
test: ["CMD", "sqlite3", "--version"]
interval: 5s
timeout: 5s
retries: 5
# MariaDB Test Database
mariadb-test:
image: mariadb:10.11
container_name: mariadb-test
environment:
MARIADB_ROOT_PASSWORD: rootpass
MARIADB_USER: testuser
MARIADB_PASSWORD: testpass
MARIADB_DATABASE: testdb
ports:
- "3308:3306"
volumes:
- mariadbdata-test:/var/lib/mysql
command: ["mysqld", "--log-bin-trust-function-creators=1"]
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "testuser", "-ptestpass"]
interval: 5s
timeout: 5s
retries: 5
liquibase-test:
build: ./liquibase-migrator
image: migkit/liquibase-migrator:test
pull_policy: never
container_name: liquibase-test
restart: "no"
environment:
# Main DB
MAIN_DB_TYPE: postgresql
MAIN_DB_HOST: postgres-test
MAIN_DB_PORT: 5432
MAIN_DB_USER: testuser
MAIN_DB_PASSWORD: testpass
MAIN_DB_NAME: testdb
# Reference DB
REF_DB_TYPE: postgresql
REF_DB_HOST: postgres-test
REF_DB_PORT: 5432
REF_DB_USER: testuser
REF_DB_PASSWORD: testpass
REF_DB_NAME: testdb_ref
CHANGELOG_FORMAT: sql
SCHEMA_SCRIPTS: /liquibase/schema/postgresql/00-init-db.sql,/liquibase/schema/postgresql/01-init-data.sql,/liquibase/schema/postgresql/02-triggers.sql
volumes:
- ./sandbox/liquibase-migrator/schema:/liquibase/schema
- ./sandbox/liquibase-migrator/liquibase.properties:/liquibase/liquibase.properties:ro
- ./sandbox/liquibase-migrator/changelog:/liquibase/changelog
- sqlitedata-test:/data
# Default command can be overridden when running
# Examples:
# --init
# --generate
# --update
# --shell
volumes:
pgdata-test:
mysqldata-test:
sqlitedata-test:
mariadbdata-test: