-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
43 lines (41 loc) · 1.04 KB
/
Copy pathdocker-compose.yml
File metadata and controls
43 lines (41 loc) · 1.04 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
services:
postgres:
image: docker.io/library/postgres:16-alpine
environment:
POSTGRES_USER: demo
POSTGRES_PASSWORD: demo
POSTGRES_DB: demo
ports:
- "127.0.0.1:5432:5432"
volumes:
- ./docker/initdb.sql:/docker-entrypoint-initdb.d/01-demo.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U demo"]
interval: 5s
timeout: 5s
retries: 10
mysql:
image: docker.io/library/mysql:8.0
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: demo
MYSQL_USER: demo
MYSQL_PASSWORD: demo
ports:
- "127.0.0.1:3306:3306"
volumes:
- ./docker/initdb.sql:/docker-entrypoint-initdb.d/01-demo.sql
healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -h 127.0.0.1 --silent"]
interval: 5s
timeout: 5s
retries: 10
sql2json:
build: .
volumes:
- ./docker/config.json:/home/app/.sql2json/config.json
depends_on:
postgres:
condition: service_healthy
mysql:
condition: service_healthy