This repository has been archived by the owner on Dec 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
131 lines (124 loc) · 3.27 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
version: '3.8'
services:
web:
image: vss365today-web:latest
container_name: web
restart: unless-stopped
volumes:
- ../web:/app
- ../web/log:/var/log
- ../secrets:/app/secrets
- ../static/images:/app/src/static/prompt-images
- ../static/downloads:/app/src/static/downloads
ports:
- 127.0.0.1:5002:80
environment:
- FLASK_ENV=production
- FLASK_DEBUG=0
- FLASK_SKIP_DOTENV=1
- SYS_VARS_PATH=/app/secrets
networks:
- vss365today
depends_on:
- database
- api
api:
image: vss365today-api:latest
container_name: api
restart: unless-stopped
volumes:
- ../api:/app
- ../api/log:/var/log
- ../secrets:/app/secrets
- ../static/images:/app/images
- ../static/downloads:/app/downloads
ports:
- 127.0.0.1:5003:80
environment:
- FLASK_ENV=production
- FLASK_DEBUG=0
- FLASK_SKIP_DOTENV=1
- SYS_VARS_PATH=/app/secrets
networks:
- vss365today
depends_on:
- database
finder:
image: vss365today-finder:latest
container_name: finder
restart: unless-stopped
volumes:
- ../finder:/app
- ../secrets:/app/secrets
- ../static/downloads:/app/downloads
environment:
- FLASK_ENV=production
- SYS_VARS_PATH=/app/secrets
- DOWNLOADS_PATH=/app/downloads
- SCHEDULE_TIMES=["05 3", "05 4", "05 5", "05 6", "05 7", "05 8", "05 9", "05 10", "05 11", "05 12"]
command: schedule --prompt
networks:
- vss365today
depends_on:
- database
- api
database:
image: mariadb:10.11
container_name: database
restart: unless-stopped
volumes:
- ../api/schema:/docker-entrypoint-initdb.d
- ../db:/var/lib/mysql
- ../secrets:/app/secrets
ports:
- 127.0.0.1:3306:3306
environment:
- MARIADB_DATABASE=vss365today
- MARIADB_USER_FILE=/app/secrets/DB_USERNAME
- MARIADB_PASSWORD_FILE=/app/secrets/DB_PASSWORD
- MARIADB_ROOT_PASSWORD_FILE=/app/secrets/DB_PASSWORD_ROOT
- MARIADB_AUTO_UPGRADE=yes
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
networks:
- vss365today
# Run a database backup at midnight every Sunday
db_backup:
image: databack/mysql-backup
container_name: mysql-backup
restart: unless-stopped
volumes:
- ../backup/database:/backup
- ../secrets:/app/secrets
environment:
- DB_DUMP_SAFECHARS=true
- DB_DUMP_CRON=0 0 * * 0
- DB_SERVER=database
- DB_PORT=3306
- DB_NAMES=vss365today
- DB_DUMP_TARGET=/backup
- NICE=true
- DB_USER_FILE=/app/secrets/DB_USERNAME
- DB_PASS_FILE=/app/secrets/DB_PASSWORD
networks:
- vss365today
depends_on:
- database
# Run an image backup on a regular interval
image_backup:
image: vss365today-finder:latest
container_name: image-backup
restart: unless-stopped
volumes:
- ../backup/images:/backup
- ../finder:/app
- ../secrets:/app/secrets
- ../static/images:/app/images
environment:
- FLASK_ENV=production
- SYS_VARS_PATH=/app/secrets
command: schedule --backup
networks:
- vss365today
networks:
vss365today:
driver: bridge