-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
219 lines (207 loc) · 5.25 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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
version: "3.8"
volumes:
bibliogram-db:
postgresdata: # Caching
teddit-pic-cache:
teddit-vid-cache:
networks:
invidious: # Invidious-Postgres
teddit-redis:
nitter-redis:
services:
alternative-cache-redis:
container_name: alternative-cache-redis
image: redis:6.2.5-alpine
networks:
- teddit-redis
- nitter-redis
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 1m
start_period: 20s
timeout: 3s
read_only: true
user: redis
mem_limit: 2G # This is estimated - change as needed.
memswap_limit: 4G
security_opt:
- no-new-privileges
teddit:
container_name: teddit
build: ./dockerfiles/teddit
image: teddit:alternative
environment:
- NODE_ENV=production
- REDIS_HOST=alternative-cache-redis
- DOMAIN=teddit.your-domain.com
- USE_HELMET=true
- USE_HELMET_HSTS=true
- TRUST_PROXY=true
- VIDEO_ENABLED=true
volumes:
# TODO: Impose size restrictions and configure it in teddit
- teddit-pic-cache:/teddit/static/pics
- teddit-vid-cache:/teddit/static/vids
ports:
- "8080:8080"
networks:
- teddit-redis
depends_on:
- alternative-cache-redis
healthcheck:
test: ["CMD", "wget" ,"--no-verbose", "--tries=1", "--spider", "http://localhost:8080/about"]
interval: 1m
start_period: 20s
timeout: 3s
retries: 2
read_only: true
mem_limit: 300M
memswap_limit: 1G
security_opt:
- no-new-privileges
bibliogram:
container_name: bibliogram
build: ./dockerfiles/bibliogram
image: bibliogram:alternative
environment:
- NODE_ENV=production
volumes:
- bibliogram-db:/home/node/app/db
ports:
- "10407:10407"
healthcheck:
test: ["CMD", "wget" ,"--no-verbose", "--tries=1", "--spider", "http://localhost:10407"]
interval: 1m
start_period: 20s
timeout: 3s
retries: 2
read_only: true
pids_limit: 50
mem_limit: 300M
memswap_limit: 1G
cap_drop:
- ALL
security_opt:
- no-new-privileges
forward:
container_name: forward
build: ./dockerfiles/forward
image: forward:latest
restart: unless-stopped
ports:
- "8084:8081"
environment:
- SCRIBE_URL=scribe.your-domain.com
- NITTER_URL=nitter.your-domain.com
- TEDDIT_URL=teddit.your-domain.com
- INVIDIOUS_URL=invidious.your-domain.com
- BIBLIOGRAM_URL=bilbio.your-domain.com
invidious-postgres:
container_name: invidious-postgres
build: ./dockerfiles/invidious_postgres
image: postgres:invidious
restart: unless-stopped
networks:
- invidious
volumes:
- postgresdata:/var/lib/postgresql/data
environment:
POSTGRES_DB: invidious
POSTGRES_USER: kemal
POSTGRES_PASSWORD: kemal
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
interval: 1m
start_period: 20s
timeout: 3s
read_only: true
tmpfs:
# For read-only filesystem issues.
- /tmp
- /run/postgresql
user: postgres
mem_limit: 2G # This is estimated - change as needed.
memswap_limit: 4G
security_opt:
- no-new-privileges
invidious:
container_name: invidious
image: quay.io/invidious/invidious:latest
restart: unless-stopped
networks:
- invidious
mem_limit: 1G
memswap_limit: 2G
cpus: 0.5
ports:
- "3000:3000"
environment:
INVIDIOUS_CONFIG: |
channel_threads: 1
check_tables: true
feed_threads: 1
db:
dbname: invidious
user: kemal
password: kemal
host: invidious-postgres
port: 5432
full_refresh: false
https_only: false
domain:
healthcheck:
test: wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/comments/jNQXAC9IVRw || exit 1
interval: 1m
start_period: 40s
timeout: 5s
retries: 2
depends_on:
- invidious-postgres
read_only: true
security_opt:
- no-new-privileges
scribe:
container_name: scribe
build: ./dockerfiles/scribe
image: scribe:alternative
ports:
- "8081:8080"
healthcheck:
test: ["CMD", "wget" ,"--no-verbose", "--tries=1", "--spider", "http://localhost:8080"]
start_period: 20s
interval: 1m
timeout: 3s
read_only: true
mem_limit: 100M
memswap_limit: 256M
security_opt:
- no-new-privileges
nitter:
container_name: nitter
build: ./dockerfiles/nitter
image: nitter:alternative
ports:
- "8082:8080"
depends_on:
- alternative-cache-redis
healthcheck:
test: ["CMD", "wget" ,"--no-verbose", "--tries=1", "--spider", "http://localhost:8080"]
interval: 1m
start_period: 20s
timeout: 3s
networks:
- nitter-redis
mem_limit: 100M
memswap_limit: 256M
security_opt:
- no-new-privileges
read_only: true
# Uncomment only if you know the consequences of exposing docker.sock
# autoheal:
# restart: unless-stopped
# image: willfarrell/autoheal
# environment:
# - AUTOHEAL_CONTAINER_LABEL=all
# volumes:
# - /var/run/docker.sock:/var/run/docker.sock
# read_only: true