-
-
Notifications
You must be signed in to change notification settings - Fork 27
/
docker-compose.yml
146 lines (134 loc) · 3.43 KB
/
docker-compose.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
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
version: "3.7"
services:
minio:
image: quay.io/minio/minio
restart: always
volumes:
- data1-1:/data1
ports:
- 9000:9000
- 9001:9001
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
command: server /data --console-address ":9001"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
postgres:
image: postgres:16
restart: always
volumes:
- pg-data:/var/lib/postgresql/data
logging:
options:
max-size: "100k"
max-file: "3"
environment:
POSTGRES_USER: db
POSTGRES_DB: db
POSTGRES_PASSWORD: db
mysql:
image: mysql:9
restart: always
volumes:
- mysql-data:/var/lib/mysql
logging:
options:
max-size: "100k"
max-file: "3"
environment:
MYSQL_ROOT_PASSWORD: db
MYSQL_DATABASE: db
MYSQL_USER: db
MYSQL_PASSWORD: db
mongo:
image: mongodb/mongodb-community-server:4.4.0-ubuntu2004
restart: always
logging:
options:
max-size: "100k"
max-file: "3"
volumes:
- mongodb-data:/data/db
environment:
MONGO_INITDB_ROOT_USERNAME: db
MONGO_INITDB_ROOT_PASSWORD: db
MONGO_INITDB_DATABASE: db
backup_postgres:
image: ghcr.io/appleboy/docker-backup-database:postgres16
logging:
options:
max-size: "100k"
max-file: "3"
environment:
STORAGE_DRIVER: s3
STORAGE_ENDPOINT: minio:9000
STORAGE_BUCKET: test
STORAGE_REGION: ap-northeast-1
STORAGE_PATH: backup_postgres
STORAGE_SSL: "false"
STORAGE_INSECURE_SKIP_VERIFY: "false"
ACCESS_KEY_ID: minioadmin
SECRET_ACCESS_KEY: minioadmin
DATABASE_DRIVER: postgres
DATABASE_HOST: postgres:5432
DATABASE_USERNAME: db
DATABASE_PASSWORD: db
DATABASE_NAME: db
DATABASE_OPTS:
backup_mysql:
image: appleboy/docker-backup-database:mysql9
logging:
options:
max-size: "100k"
max-file: "3"
environment:
STORAGE_DRIVER: s3
STORAGE_ENDPOINT: minio:9000
STORAGE_BUCKET: test
STORAGE_REGION: ap-northeast-1
STORAGE_PATH: backup_mysql
STORAGE_SSL: "false"
STORAGE_INSECURE_SKIP_VERIFY: "false"
ACCESS_KEY_ID: minioadmin
SECRET_ACCESS_KEY: minioadmin
DATABASE_DRIVER: mysql
DATABASE_HOST: mysql:3306
DATABASE_USERNAME: root
DATABASE_PASSWORD: db
DATABASE_NAME: db
DATABASE_OPTS:
backup_mysql_schedule:
image: ghcr.io/appleboy/appleboy/docker-backup-database:mysql9
logging:
options:
max-size: "100k"
max-file: "3"
environment:
STORAGE_DRIVER: s3
STORAGE_ENDPOINT: minio:9000
STORAGE_BUCKET: test
STORAGE_REGION: ap-northeast-1
STORAGE_PATH: backup_mysql
STORAGE_SSL: "false"
STORAGE_INSECURE_SKIP_VERIFY: "false"
ACCESS_KEY_ID: minioadmin
SECRET_ACCESS_KEY: minioadmin
DATABASE_DRIVER: mysql
DATABASE_HOST: mysql:3306
DATABASE_USERNAME: root
DATABASE_PASSWORD: db
DATABASE_NAME: db
DATABASE_OPTS:
TIME_SCHEDULE: "@daily"
TIME_LOCATION: Asia/Taipei
## By default this config uses default local driver,
## For custom volumes replace with volume driver configuration.
volumes:
data1-1:
pg-data:
mysql-data:
mongodb-data: