-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
144 lines (144 loc) · 3.94 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
version: '3.9'
x-env_files: &env_files
- .production.env
- .version.env
x-common: &common
restart: always
env_file: *env_files
services:
nginx:
<<: *common
image: ghcr.io/amthorn/qutex/qutex_nginx:${QUTEX_VERSION:-latest}
depends_on:
- ui
- auth
- projects
- users
environment:
CERTBOT_EMAIL: [email protected]
RENEWAL_INTERVAL: 8d
volumes:
- cert_files:/etc/letsencrypt
ports:
- target: 80
published: 80
mode: host
- target: 443
published: 443
mode: host
restart: always
bot:
<<: *common
image: ghcr.io/amthorn/qutex/qutex_bot:${QUTEX_VERSION:-latest}
depends_on:
- mongo
ports:
- target: 3000
published: 3000
mode: host
secrets:
- token
- mongoPassword
ui:
<<: *common
image: ghcr.io/amthorn/qutex/qutex_ui:${QUTEX_VERSION:-latest}
depends_on:
- mongo
- bot
# - api
build:
context: services/ui/
projects:
<<: *common
image: ghcr.io/amthorn/qutex/qutex_projects:${QUTEX_VERSION:-latest}
depends_on:
- mongo
- auth
secrets:
- mongoPassword
users:
<<: *common
image: ghcr.io/amthorn/qutex/qutex_users:${QUTEX_VERSION:-latest}
depends_on:
- auth
secrets:
- token
- mongoPassword
auth:
<<: *common
image: ghcr.io/amthorn/qutex/qutex_auth:${QUTEX_VERSION:-latest}
depends_on:
- redis
- mongo
secrets:
- privateKey
- token
- mongoPassword
redis:
restart: always
image: redis:6.2.1
migrate:
depends_on:
- mongo
image: ghcr.io/amthorn/qutex/qutex_bot:${QUTEX_VERSION:-latest}
env_file: *env_files
secrets:
- mongoPassword
entrypoint: node_modules/migrate-mongo/bin/migrate-mongo.js
command: up
# command: down # undo-last
# command: status # status
mongo:
<<: *common
image: mongo:4.4.5
volumes:
- mongo_volume:/data/db
secrets:
- mongoPassword
mongo_ui:
image: mongo-express:1.0.0-alpha
depends_on:
- mongo
environment:
ME_CONFIG_MONGODB_SERVER: mongo
ME_CONFIG_MONGODB_ADMINUSERNAME: root
ME_CONFIG_MONGODB_ADMINPASSWORD_FILE: /run/secrets/mongoPassword
ME_CONFIG_SITE_BASEURL: /admin/mongo/
ME_CONFIG_OPTIONS_NO_DELETE: "true"
ME_CONFIG_OPTIONS_READONLY: "true"
ME_CONFIG_MONGODB_ENABLE_ADMIN: "true"
secrets:
- mongoPassword
mongo_backup:
image: ghcr.io/amthorn/qutex/qutex_mongo_backup:${QUTEX_VERSION:-latest}
environment:
MONGODB_HOST: mongo
MONGODB_PORT: 27017
MONGODB_USER: root
MONGODB_PASS_FILE: /run/secrets/mongoPassword
CRON_TIME: 0 0 * * *
EXTRA_OPTS: --authenticationDatabase admin --db qutex --gzip --forceTableScan
MAX_BACKUPS: 14
INIT_BACKUP: 1
volumes:
- ./mongo_backups:/backup
secrets:
- mongoPassword
redis_ui:
image: rediscommander/redis-commander
environment:
REDIS_HOST: redis
REDIS_PORT: "6379"
URL_PREFIX: /admin/redis
ports:
- 8081:8081
secrets:
token:
file: secrets/prod/token
mongoPassword:
file: secrets/prod/mongoPassword
privateKey:
file: secrets/prod/privateKey
volumes:
mongo_volume:
cert_files: