-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
50 lines (47 loc) · 1.35 KB
/
docker-compose.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
47
48
49
50
version: "3.9"
services:
mariadb:
image: mariadb:10.7
healthcheck:
test: mysql sqlassert --user=sqlassert --password='password' --silent --execute "USE sqlassert;"
timeout: 45s
interval: 10s
retries: 10
restart: always
environment:
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: 1
MARIADB_USER: sqlassert
MARIADB_PASSWORD: password
MARIADB_DATABASE: sqlassert
ports:
- 3306:3306
postgres:
image: postgres:14-alpine
healthcheck:
test: pg_isready -d sqlassert -U sqlassert
timeout: 45s
interval: 10s
retries: 10
restart: always
environment:
POSTGRES_USER: sqlassert
POSTGRES_PASSWORD: password
POSTGRES_DB: sqlassert
ports:
- 5432:5432
migrate_postgres:
image: migrate/migrate:v4.14.1
depends_on:
postgres:
condition: service_healthy
command: -path=/migrations/postgres -database "postgresql://sqlassert:password@postgres:5432/sqlassert?sslmode=disable" up
volumes:
- ./testdata/migrations/postgres:/migrations/postgres
migrate_mysql:
image: migrate/migrate:v4.14.1
depends_on:
mariadb:
condition: service_healthy
command: -path=/migrations/mysql -database "mysql://sqlassert:password@tcp(mariadb:3306)/sqlassert" up
volumes:
- ./testdata/migrations/mysql:/migrations/mysql