-
Notifications
You must be signed in to change notification settings - Fork 128
/
docker-compose-postgres-minio.yml
58 lines (57 loc) · 1.51 KB
/
docker-compose-postgres-minio.yml
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
version: '3'
services:
source-postgres:
image: postgres:13
restart: always
healthcheck:
test: [ "CMD", "pg_isready", "-q", "-d", "postgres", "-U", "root" ]
timeout: 45s
interval: 10s
retries: 10
environment:
- POSTGRES_USER=root
- POSTGRES_PASSWORD=password
volumes:
- ./db/postgres:/docker-entrypoint-initdb.d/
ports:
- 5432:5432
dest-postgres:
image: postgres:13
restart: always
healthcheck:
test: [ "CMD", "pg_isready", "-q", "-d", "postgres", "-U", "root" ]
timeout: 45s
interval: 10s
retries: 10
environment:
- POSTGRES_USER=root
- POSTGRES_PASSWORD=password
ports:
- 5453:5432
bridge-minio:
image: minio/minio:RELEASE.2022-03-17T06-34-49Z
restart: always
command: server --console-address ":9001" /data/minio/
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
ports:
- 9000:9000
- 9001:9001
create-minio-bucket:
image: minio/mc
depends_on:
- bridge-minio
entrypoint: >
/bin/sh -c "
/usr/bin/mc config host add myminio http://bridge-minio:9000 minioadmin minioadmin;
/usr/bin/mc rm -r --force myminio/replibyte-test;
/usr/bin/mc mb myminio/replibyte-test;
/usr/bin/mc policy download myminio/replibyte-test;
exit 0;
"