forked from kartoza/docker-pg-backup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-s3.yml
61 lines (55 loc) · 1.6 KB
/
docker-compose-s3.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
59
60
61
version: '2.1'
volumes:
db-data:
minio_data:
services:
db:
image: kartoza/postgis:$POSTGRES_MAJOR_VERSION-$POSTGIS_MAJOR_VERSION.${POSTGIS_MINOR_RELEASE}
volumes:
- db-data:/var/lib/postgresql
environment:
- POSTGRES_DB=gis
- POSTGRES_USER=docker
- POSTGRES_PASS=docker
- ALLOW_IP_RANGE=0.0.0.0/0
- POSTGRES_MULTIPLE_EXTENSIONS=postgis,hstore,postgis_topology,postgis_raster,pgrouting
restart: on-failure
healthcheck:
test: "PGPASSWORD=${POSTGRES_PASS} pg_isready -h 127.0.0.1 -U docker -d gis"
minio:
image: quay.io/minio/minio
environment:
- MINIO_ROOT_USER=minio_admin
- MINIO_ROOT_PASSWORD=secure_minio_secret
entrypoint: /bin/bash
command: -c 'minio server /data --console-address ":9001"'
volumes:
- minio_data:/data
ports:
- "9000:9000"
- "9001:9001"
healthcheck:
test: curl --fail -s http://localhost:9000/ || exit 1
dbbackups:
image: kartoza/pg-backup:$POSTGRES_MAJOR_VERSION-$POSTGIS_MAJOR_VERSION.${POSTGIS_MINOR_RELEASE}
environment:
- DUMPPREFIX=PG
- POSTGRES_HOST=db
- POSTGRES_USER=docker
- POSTGRES_PASS=docker
- POSTGRES_PORT=5432
- STORAGE_BACKEND=S3
- ACCESS_KEY_ID=minio_admin
- SECRET_ACCESS_KEY=secure_minio_secret
- DEFAULT_REGION=us-west-2
- BUCKET=backups
- HOST_BASE=minio:9000
- HOST_BUCKET=backup
- SSL_SECURE=False
#- CRON_SCHEDULE="*/5 * * * *"
restart: on-failure
depends_on:
db:
condition: service_healthy
minio:
condition: service_started