-
Notifications
You must be signed in to change notification settings - Fork 1k
/
docker-compose.yml
178 lines (166 loc) · 4.44 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
version: '2'
services:
newsblur_web:
hostname: nb.com
container_name: newsblur_web
image: newsblur/newsblur_${NEWSBLUR_BASE:-python3}:latest
# build:
# context: /srv/newsblur
# dockerfile: docker/newsblur_base_image.Dockerfile
user: "${CURRENT_UID}:${CURRENT_GID}"
environment:
- DOCKERBUILD=True
- RUNWITHMAKEBUILD=${RUNWITHMAKEBUILD?Use the `make` command instead of docker CLI}
stdin_open: true
tty: true
restart: unless-stopped
depends_on:
- db_mongo
- db_postgres
- db_redis
- db_elasticsearch
ulimits:
nproc: 10000
nofile:
soft: 10000
hard: 10000
ports:
- 8000:8000
# only use gunicorn if the TEST env variable is not "True"
entrypoint: /bin/sh -c newsblur_web/entrypoint.sh
volumes:
- ${PWD}:/srv/newsblur
newsblur_node:
container_name: node
image: newsblur/newsblur_node:latest
user: "${CURRENT_UID}:${CURRENT_GID}"
environment:
- NODE_ENV=docker
- MONGODB_PORT=29019
command: node newsblur.js
restart: unless-stopped
stop_signal: HUP
depends_on:
- db_mongo
- db_postgres
- db_redis
ports:
- 8008:8008
volumes:
- ${PWD}/node:/srv
- ${PWD}/node/originals:/srv/originals
imageproxy:
container_name: imageproxy
# image: ghcr.io/willnorris/imageproxy:latest # Enable if you don't need arm64 and want the original imageproxy
image: yusukeito/imageproxy:v0.11.2 # Enable if you want arm64
user: "${CURRENT_UID}:${CURRENT_GID}"
entrypoint: /app/imageproxy -addr 0.0.0.0:8088 -cache /tmp/imageproxy -verbose
restart: unless-stopped
ports:
- 8088:8088
volumes:
- /tmp:/tmp/imageproxy
nginx:
container_name: nginx
image: nginx:1.19.6
restart: unless-stopped
ports:
- 81:81
depends_on:
- newsblur_web
- newsblur_node
- db_postgres
- db_redis
- db_mongo
- db_elasticsearch
environment:
- DOCKERBUILD=True
volumes:
- ./docker/nginx/nginx.local.conf:/etc/nginx/conf.d/nginx.conf
- ${PWD}:/srv/newsblur
db_postgres:
container_name: db_postgres
image: postgres:13.1
restart: unless-stopped
environment:
- POSTGRES_USER=newsblur
- POSTGRES_PASSWORD=newsblur
# healthcheck:
# test: ["CMD-SHELL", "pg_isready -U newsblur"]
# interval: 10s
# timeout: 5s
# retries: 5
ports:
- 5434:5432
volumes:
- ./docker/volumes/postgres:/var/lib/postgresql/data
db_redis:
container_name: db_redis
image: redis:latest
ports:
- 6579:6579
restart: unless-stopped
volumes:
- ./docker/redis/redis.conf:/etc/redis/redis.conf
- ./docker/redis/redis_server.conf:/usr/local/etc/redis/redis_replica.conf
- ./docker/volumes/redis:/data
command: redis-server /etc/redis/redis.conf --port 6579
db_elasticsearch:
container_name: db_elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch:7.16.3
mem_limit: 512mb
restart: unless-stopped
environment:
- discovery.type=single-node
ports:
- 9200:9200
- 9300:9300
volumes:
- ./docker/volumes/elasticsearch:/usr/share/elasticsearch/data
- ./config/elasticsearch/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
dejavu:
container_name: dejavu
image: appbaseio/dejavu:3.6.0
restart: unless-stopped
ports:
- 1358:1358
db_mongo:
container_name: db_mongo
image: mongo:4.0
user: mongodb
restart: unless-stopped
ports:
- 29019:29019
command: mongod --port 29019
volumes:
- ./docker/volumes/db_mongo:/data/db
task_celery:
container_name: task_celery
image: newsblur/newsblur_python3
user: "${CURRENT_UID}:${CURRENT_GID}"
command: "celery worker -A newsblur_web -B --loglevel=INFO"
restart: unless-stopped
volumes:
- ${PWD}:/srv/newsblur
environment:
- DOCKERBUILD=True
haproxy:
container_name: haproxy
image: haproxy:latest
restart: unless-stopped
depends_on:
- nginx
- newsblur_web
- newsblur_node
- imageproxy
- db_redis
- db_postgres
- db_elasticsearch
- db_mongo
ports:
- 80:80
- 443:443
- 1936:1936
volumes:
- ./docker/haproxy/haproxy.docker-compose.cfg:/usr/local/etc/haproxy/haproxy.cfg
- ${PWD}:/srv/newsblur