forked from eeshugerman/postgres-backup-s3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
71 lines (66 loc) · 1.75 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# this file is here to facilitate development/testing
# $ docker compose up -d --build --force-recreate
services:
postgres:
image: postgres:15-alpine
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
mysql:
image: mysql:8.0
environment:
MYSQL_USER: user
MYSQL_PASSWORD: password
MYSQL_DATABASE: database
MYSQL_ROOT_PASSWORD: root_password
minio:
image: bitnami/minio
ports:
- 9000:9000
- 9001:9001
environment:
MINIO_ROOT_USER: miniouser
MINIO_ROOT_PASSWORD: minioroot
MINIO_DEFAULT_BUCKETS: backups
backup-postgres:
build:
context: .
args:
ALPINE_VERSION: '3.18'
environment:
# SCHEDULE: '@weekly' # optional
BACKUP_KEEP_DAYS: 7 # optional
PASSPHRASE: passphrase # optional
# S3_REGION:
S3_ENDPOINT: http://minio:9000
S3_ACCESS_KEY_ID: miniouser
S3_SECRET_ACCESS_KEY: minioroot
S3_BUCKET: backups
S3_PREFIX: postgres-backups
DATABASE_HOST: postgres
DATABASE_NAME: user
DATABASE_USER: user
DATABASE_PORT: 5432
DATABASE_SERVER: postgres
DATABASE_PASSWORD: password
backup-mysql:
build:
context: .
args:
ALPINE_VERSION: '3.18'
environment:
# SCHEDULE: '@weekly' # optional
BACKUP_KEEP_DAYS: 7 # optional
PASSPHRASE: passphrase # optional
# S3_REGION:
S3_ENDPOINT: http://minio:9000
S3_ACCESS_KEY_ID: miniouser
S3_SECRET_ACCESS_KEY: minioroot
S3_BUCKET: backups
S3_PREFIX: mysql-backups
DATABASE_HOST: mysql
DATABASE_NAME: database
DATABASE_USER: root
DATABASE_PORT: 3306
DATABASE_SERVER: mysql
DATABASE_PASSWORD: root_password