-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
121 lines (110 loc) · 2.89 KB
/
Copy pathdocker-compose.yml
File metadata and controls
121 lines (110 loc) · 2.89 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
name: hyper-backup
services:
mysql:
image: mysql:8
container_name: mysql
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: rootpass
MYSQL_DATABASE: testdb
ports:
- "3306:3306"
volumes:
- mysql_data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s
timeout: 5s
retries: 5
postgres:
image: postgres:15
container_name: postgres
restart: unless-stopped
environment:
POSTGRES_PASSWORD: rootpass
POSTGRES_DB: testdb
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
mongo:
image: mongo:6
container_name: mongo
restart: unless-stopped
ports:
- "27017:27017"
volumes:
- mongo_data:/data/db
healthcheck:
test: ["CMD", "mongo", "--eval", "db.runCommand({ ping: 1 })"]
interval: 10s
timeout: 5s
retries: 5
minio:
image: minio/minio
container_name: minio
restart: unless-stopped
command: server /data --console-address ":9001"
ports:
- "9000:9000"
- "9001:9001"
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
volumes:
- minio_data:/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 10s
timeout: 5s
retries: 5
hyper-backup:
build: .
container_name: hyper-backup
depends_on:
- mysql
- postgres
- mongo
- minio
environment:
# MySQL
MYSQL_HOST: mysql
MYSQL_USER: root
MYSQL_PASSWORD: rootpass
MYSQL_DATABASE: testdb
# PostgreSQL
POSTGRES_HOST: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: rootpass
POSTGRES_DB: testdb
# MongoDB
MONGO_HOST: mongo
# Rclone / MinIO
RCLONE_REMOTE: minio
RCLONE_PATH: minio:backup
AWS_ACCESS_KEY_ID: t5EIcZi5TrWisS5FOAg9
AWS_SECRET_ACCESS_KEY: ACixu8gVxAVAEJgOhJDHtWWvMHmlUxdLDpdlJ02Q
S3_ENDPOINT: http://minio:9000
RCLONE_CONFIG_MINIO_TYPE: s3
RCLONE_CONFIG_MINIO_PROVIDER: Minio
RCLONE_CONFIG_MINIO_ACCESS_KEY_ID: t5EIcZi5TrWisS5FOAg9
RCLONE_CONFIG_MINIO_SECRET_ACCESS_KEY: ACixu8gVxAVAEJgOhJDHtWWvMHmlUxdLDpdlJ02Q
RCLONE_CONFIG_MINIO_ENDPOINT: http://minio:9000
RCLONE_CONFIG_MINIO_REGION: us-east-1
RCLONE_CONFIG_MINIO_ENV_AUTH: false
# Traefik log rotation
TRAEFIK_LOG_FILE: /home/ubuntu/cloud-proxy/logs/access.json
PACK_UP_HYPER_BACKUP_1: /home/hyper-backup/
volumes:
- /home/ubuntu/cloud-proxy/logs:/home/ubuntu/cloud-proxy/logs
- /var/run/docker.sock:/var/run/docker.sock
volumes:
mysql_data:
postgres_data:
mongo_data:
minio_data: