-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
160 lines (147 loc) · 4.65 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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
version: '3.8'
services:
token-generator:
image: az-gg-token:latest
build:
context: .
dockerfile: token-generator/Dockerfile
volumes:
- ./credentials.json:/app/credentials.json:ro
- ./token.json:/app/token.json
environment:
- GOOGLE_CREDENTIALS_PATH=/app/credentials.json
- GOOGLE_TOKEN_PATH=/app/token.json
tty: true
stdin_open: true
restart: "no"
backup-service:
image: az-gg-backup:latest
build:
context: .
dockerfile: backup-service/Dockerfile
volumes:
- ./backups:/app/backups
- ./temp:/app/temp
- ./credentials.json:/app/credentials.json:ro
- ./token.json:/app/token.json
environment:
# Azure Storage Configuration
- AZURE_ACCOUNT_NAME=${AZURE_ACCOUNT_NAME}
- AZURE_ACCOUNT_KEY=${AZURE_ACCOUNT_KEY}
- AZURE_CONTAINER_NAME=${AZURE_CONTAINER_NAME:-"ALL"}
# Google Drive Configuration
- GOOGLE_CREDENTIALS_PATH=/app/credentials.json
- GOOGLE_TOKEN_PATH=/app/token.json
- GOOGLE_SHARED_DRIVE_ID=${GOOGLE_SHARED_DRIVE_ID}
- GOOGLE_FOLDER_ID=${GOOGLE_FOLDER_ID}
# Backup Configuration
- BACKUP_PATH=/app/backups
- TEMP_DIR=/app/temp
- BACKUP_SCHEDULE=${BACKUP_SCHEDULE:-"0 1 * * *"}
- BACKUP_RETENTION_DAYS=${BACKUP_RETENTION_DAYS:-7}
- MAX_CONCURRENT_OPERATIONS=${MAX_CONCURRENT_OPERATIONS:-10}
# Application Configuration
- TZ=${TZ:-Asia/Ho_Chi_Minh}
- LOG_LEVEL=${LOG_LEVEL:-info}
- ENABLE_METRICS=${ENABLE_METRICS:-true}
- METRICS_PORT=${METRICS_PORT:-9090}
deploy:
resources:
limits:
cpus: '${CPU_LIMIT:-1}'
memory: ${MEMORY_LIMIT:-1g}
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
restart: always
env_file:
- .env
restore-service:
image: az-gg-restore:latest
build:
context: .
dockerfile: restore-service/Dockerfile
volumes:
- ./temp:/app/temp
- ./credentials.json:/app/credentials.json:ro
- ./token.json:/app/token.json
environment:
# Target Azure Storage Configuration
- TARGET_AZURE_ACCOUNT_NAME=${TARGET_AZURE_ACCOUNT_NAME}
- TARGET_AZURE_ACCOUNT_KEY=${TARGET_AZURE_ACCOUNT_KEY}
- TARGET_AZURE_CONTAINER_NAME=${TARGET_AZURE_CONTAINER_NAME:-"ALL"}
# Google Drive Configuration
- GOOGLE_CREDENTIALS_PATH=/app/credentials.json
- GOOGLE_TOKEN_PATH=/app/token.json
- GOOGLE_SHARED_DRIVE_ID=${GOOGLE_SHARED_DRIVE_ID}
- GOOGLE_FOLDER_ID=${GOOGLE_FOLDER_ID}
# Restore Configuration
- TEMP_DIR=/app/temp
- MAX_CONCURRENT_OPERATIONS=${MAX_CONCURRENT_OPERATIONS:-10}
# Application Configuration
- TZ=${TZ:-Asia/Ho_Chi_Minh}
- LOG_LEVEL=${LOG_LEVEL:-info}
- ENABLE_METRICS=${ENABLE_METRICS:-true}
- METRICS_PORT=${METRICS_PORT:-9090}
deploy:
resources:
limits:
cpus: '${CPU_LIMIT:-1}'
memory: ${MEMORY_LIMIT:-1g}
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
restart: "no"
env_file:
- .env
do-restore-service:
image: do-gg-restore:latest
build:
context: .
dockerfile: do-restore-service/Dockerfile
volumes:
- ./temp:/app/temp
- ./credentials.json:/app/credentials.json:ro
- ./token.json:/app/token.json
environment:
# Google Drive Configuration
- GOOGLE_CREDENTIALS_PATH=/app/credentials.json
- GOOGLE_TOKEN_PATH=/app/token.json
- GOOGLE_SHARED_DRIVE_ID=${GOOGLE_SHARED_DRIVE_ID}
- GOOGLE_FOLDER_ID=${GOOGLE_FOLDER_ID}
# DigitalOcean Spaces Configuration
- SPACES_ENDPOINT=${SPACES_ENDPOINT:-"https://sgp1.digitaloceanspaces.com"}
- SPACES_REGION=${SPACES_REGION:-"sgp1"}
- SPACES_ACCESS_KEY_ID=${SPACES_ACCESS_KEY_ID}
- SPACES_SECRET_ACCESS_KEY=${SPACES_SECRET_ACCESS_KEY}
- SPACES_BUCKET_NAME=${SPACES_BUCKET_NAME}
# Restore Configuration
- TEMP_DIR=/app/temp
- RESTORE_CONTAINER_NAME=${RESTORE_CONTAINER_NAME}
# Application Configuration
- TZ=${TZ:-Asia/Ho_Chi_Minh}
- LOG_LEVEL=${LOG_LEVEL:-info}
- ENABLE_METRICS=${ENABLE_METRICS:-true}
- METRICS_PORT=${METRICS_PORT:-9090}
deploy:
resources:
limits:
cpus: '${CPU_LIMIT:-1}'
memory: ${MEMORY_LIMIT:-1g}
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
restart: "no"
env_file:
- .env