-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathdocker-compose.test.yml
More file actions
149 lines (138 loc) · 3.68 KB
/
Copy pathdocker-compose.test.yml
File metadata and controls
149 lines (138 loc) · 3.68 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# Test fixtures for db-mover: a source and a target for every supported engine, so
# copy migrations have somewhere to migrate *to*. This does not run the app itself.
#
# npm run db:up start everything and wait until healthy
# npm run db:seed load fixtures (tables, FKs, documents, key groups) into the sources
# npm run db:reset wipe and re-seed
# npm run db:down stop and delete the volumes
#
# Host ports are deliberately off-default so these never collide with a Postgres,
# MySQL, Mongo or Redis already running on the machine.
name: dbmover-test
services:
postgres-source:
image: postgres:17-alpine
environment:
POSTGRES_USER: dbmover
POSTGRES_PASSWORD: dbmover
POSTGRES_DB: source_db
ports:
- "5442:5432"
volumes:
- postgres-source-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U dbmover -d source_db"]
interval: 3s
timeout: 5s
retries: 20
postgres-target:
image: postgres:17-alpine
environment:
POSTGRES_USER: dbmover
POSTGRES_PASSWORD: dbmover
POSTGRES_DB: target_db
ports:
- "5443:5432"
volumes:
- postgres-target-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U dbmover -d target_db"]
interval: 3s
timeout: 5s
retries: 20
mysql-source:
image: mysql:8.4
environment:
MYSQL_ROOT_PASSWORD: dbmover
MYSQL_DATABASE: source_db
ports:
- "3316:3306"
volumes:
- mysql-source-data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1", "-uroot", "-pdbmover"]
interval: 5s
timeout: 5s
retries: 30
mysql-target:
image: mysql:8.4
environment:
MYSQL_ROOT_PASSWORD: dbmover
MYSQL_DATABASE: target_db
ports:
- "3317:3306"
volumes:
- mysql-target-data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1", "-uroot", "-pdbmover"]
interval: 5s
timeout: 5s
retries: 30
mongo-source:
image: mongo:7
ports:
- "27027:27017"
volumes:
- mongo-source-data:/data/db
healthcheck:
test: ["CMD", "mongosh", "--quiet", "--eval", "db.adminCommand('ping').ok"]
interval: 5s
timeout: 5s
retries: 20
mongo-target:
image: mongo:7
ports:
- "27028:27017"
volumes:
- mongo-target-data:/data/db
healthcheck:
test: ["CMD", "mongosh", "--quiet", "--eval", "db.adminCommand('ping').ok"]
interval: 5s
timeout: 5s
retries: 20
redis-source:
image: redis:7-alpine
ports:
- "6389:6379"
volumes:
- redis-source-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 3s
timeout: 5s
retries: 20
redis-target:
image: redis:7-alpine
ports:
- "6390:6379"
volumes:
- redis-target-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 3s
timeout: 5s
retries: 20
# Opt-in: `npm run db:up:firebase`. Kept out of the default set because it builds a
# JRE image, which is far slower than pulling the other four.
firebase-emulator:
profiles: ["firebase"]
build:
context: ./test/firebase
ports:
- "9009:9000" # Realtime Database
- "8088:8080" # Firestore
healthcheck:
test: ["CMD", "curl", "-sf", "http://127.0.0.1:8080/"]
interval: 5s
timeout: 5s
retries: 30
start_period: 20s
volumes:
postgres-source-data:
postgres-target-data:
mysql-source-data:
mysql-target-data:
mongo-source-data:
mongo-target-data:
redis-source-data:
redis-target-data: