2020-10-04 17:41:04 +07:00
|
|
|
version: '3'
|
2016-08-28 20:42:07 -07:00
|
|
|
services:
|
2021-03-08 19:04:44 -05:00
|
|
|
|
2020-10-04 17:41:04 +07:00
|
|
|
newsblur_web:
|
2020-10-27 09:59:00 +07:00
|
|
|
hostname: nb.com
|
2020-10-04 17:41:04 +07:00
|
|
|
container_name: newsblur_web
|
2021-03-09 12:00:06 -05:00
|
|
|
image: newsblur/newsblur_python3:latest
|
2020-10-04 17:41:04 +07:00
|
|
|
environment:
|
|
|
|
- DOCKERBUILD=True
|
|
|
|
stdin_open: true
|
|
|
|
tty: true
|
2021-03-16 15:20:24 -04:00
|
|
|
restart: unless-stopped
|
2020-10-04 17:41:04 +07:00
|
|
|
depends_on:
|
2021-03-15 11:24:45 -04:00
|
|
|
- db_mongo
|
|
|
|
- db_postgres
|
|
|
|
- db_redis
|
|
|
|
- db_elasticsearch
|
2020-10-04 17:41:04 +07:00
|
|
|
ulimits:
|
|
|
|
nproc: 10000
|
|
|
|
nofile:
|
|
|
|
soft: 10000
|
|
|
|
hard: 10000
|
2021-02-21 11:59:21 -05:00
|
|
|
expose:
|
2021-03-08 19:04:44 -05:00
|
|
|
- 8000
|
2020-10-13 22:03:25 +07:00
|
|
|
# only use gunicorn if the TEST env variable is not "True"
|
2021-03-16 13:36:20 -05:00
|
|
|
entrypoint: /bin/sh -c newsblur_web/entrypoint.sh
|
2020-10-04 17:41:04 +07:00
|
|
|
volumes:
|
2021-04-03 12:32:42 -05:00
|
|
|
- ${PWD}:/srv/newsblur
|
2021-03-16 20:00:55 -04:00
|
|
|
|
|
|
|
newsblur_node:
|
|
|
|
image: newsblur/newsblur_node:latest
|
|
|
|
container_name: node
|
|
|
|
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:
|
2021-04-03 12:32:42 -05:00
|
|
|
- ${PWD}/node:/srv
|
2021-03-08 19:04:44 -05:00
|
|
|
|
2021-04-01 17:01:05 -04:00
|
|
|
imageproxy:
|
|
|
|
image: willnorris/imageproxy:latest
|
|
|
|
container_name: imageproxy
|
|
|
|
entrypoint: /app/imageproxy -addr 0.0.0.0:8088 -cache /tmp/imageproxy -verbose
|
|
|
|
restart: unless-stopped
|
|
|
|
ports:
|
|
|
|
- 8088:8088
|
|
|
|
volumes:
|
|
|
|
- /tmp:/tmp/imageproxy
|
|
|
|
|
2020-10-04 17:41:04 +07:00
|
|
|
nginx:
|
|
|
|
container_name: nginx
|
2021-01-18 11:59:29 -05:00
|
|
|
image: nginx:1.19.6
|
2020-10-04 17:41:04 +07:00
|
|
|
ports:
|
|
|
|
- 81:81
|
|
|
|
depends_on:
|
2021-03-15 11:13:27 -04:00
|
|
|
- newsblur_web
|
2021-03-16 20:00:55 -04:00
|
|
|
- newsblur_node
|
2021-03-15 11:13:27 -04:00
|
|
|
- db_postgres
|
|
|
|
- db_redis
|
|
|
|
- db_mongo
|
|
|
|
- db_elasticsearch
|
2020-10-04 17:41:04 +07:00
|
|
|
environment:
|
|
|
|
- DOCKERBUILD=True
|
|
|
|
volumes:
|
2021-03-15 11:13:27 -04:00
|
|
|
- ./docker/nginx/nginx.local.conf:/etc/nginx/conf.d/nginx.conf
|
2021-04-03 12:32:42 -05:00
|
|
|
- ${PWD}:/srv/newsblur
|
2016-08-28 20:42:07 -07:00
|
|
|
|
2021-03-08 14:14:15 -05:00
|
|
|
db_postgres:
|
|
|
|
container_name: db_postgres
|
2021-01-22 19:22:45 -05:00
|
|
|
image: postgres:13.1
|
2016-08-28 20:42:07 -07:00
|
|
|
environment:
|
|
|
|
- POSTGRES_USER=newsblur
|
|
|
|
- POSTGRES_PASSWORD=newsblur
|
2021-03-09 12:02:02 -05:00
|
|
|
healthcheck:
|
|
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
|
|
interval: 10s
|
|
|
|
timeout: 5s
|
|
|
|
retries: 5
|
2016-08-28 20:42:07 -07:00
|
|
|
ports:
|
2021-03-08 19:04:44 -05:00
|
|
|
- 5434:5432
|
2016-08-28 20:42:07 -07:00
|
|
|
volumes:
|
2018-10-07 12:04:20 -05:00
|
|
|
- ./docker/volumes/postgres:/var/lib/postgresql/data
|
2016-08-28 20:42:07 -07:00
|
|
|
|
2021-03-08 14:14:15 -05:00
|
|
|
db_redis:
|
2021-01-18 11:59:29 -05:00
|
|
|
image: redis:3.2.6
|
2016-08-28 20:42:07 -07:00
|
|
|
ports:
|
2021-03-08 17:39:10 -05:00
|
|
|
- 6579:6579
|
2021-03-08 14:14:15 -05:00
|
|
|
container_name: db_redis
|
2018-10-07 12:04:20 -05:00
|
|
|
volumes:
|
2021-03-08 19:47:24 -05:00
|
|
|
- ./config/redis.conf:/etc/redis/redis.conf
|
|
|
|
- ./config/redis_docker.conf:/etc/redis/redis_server.conf
|
|
|
|
- ./docker/volumes/redis:/var/lib/redis
|
|
|
|
command: redis-server /etc/redis/redis.conf --port 6579
|
2016-08-28 20:42:07 -07:00
|
|
|
|
2021-03-08 14:14:15 -05:00
|
|
|
db_elasticsearch:
|
|
|
|
container_name: db_elasticsearch
|
2021-04-01 17:01:05 -04:00
|
|
|
image: docker.elastic.co/elasticsearch/elasticsearch:7.11.1
|
|
|
|
mem_limit: 512mb
|
|
|
|
environment:
|
|
|
|
- discovery.type=single-node
|
2016-08-28 20:42:07 -07:00
|
|
|
ports:
|
2021-03-08 19:04:44 -05:00
|
|
|
- 9200:9200
|
2021-04-01 17:01:05 -04:00
|
|
|
- 9300:9300
|
2018-10-07 12:04:20 -05:00
|
|
|
volumes:
|
|
|
|
- ./docker/volumes/elasticsearch:/usr/share/elasticsearch/data
|
2021-04-07 14:02:23 -04:00
|
|
|
- ./config/elasticsearch/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
|
2016-08-28 20:42:07 -07:00
|
|
|
|
2020-10-04 17:41:04 +07:00
|
|
|
db_mongo:
|
|
|
|
container_name: db_mongo
|
2021-01-24 22:30:51 -05:00
|
|
|
image: mongo:3.6
|
2016-08-28 20:42:07 -07:00
|
|
|
ports:
|
2020-10-25 12:48:17 +07:00
|
|
|
- 29019:29019
|
|
|
|
command: mongod --smallfiles --port 29019
|
2018-10-07 12:04:20 -05:00
|
|
|
volumes:
|
2020-10-04 17:41:04 +07:00
|
|
|
- ./docker/volumes/db_mongo:/data/db
|
|
|
|
|
|
|
|
celerybeat:
|
|
|
|
container_name: celerybeat
|
|
|
|
image: newsblur/newsblur_python3
|
2020-10-13 22:03:25 +07:00
|
|
|
command: bash -c "mkdir -p data && celery beat -A newsblur_web --schedule=/srv/newsblur/data/celerybeat-schedule.db --loglevel=INFO --pidfile=/srv/celeryd.pid"
|
2020-10-04 17:41:04 +07:00
|
|
|
environment:
|
|
|
|
- DOCKERBUILD=True
|
|
|
|
volumes:
|
2021-04-03 12:32:42 -05:00
|
|
|
- ${PWD}:/srv/newsblur
|
2020-10-04 17:41:04 +07:00
|
|
|
- ./config:/etc/supervisor/conf.d/
|
|
|
|
|
2021-03-08 19:04:44 -05:00
|
|
|
task_celery:
|
|
|
|
container_name: task_celery
|
2020-10-04 17:41:04 +07:00
|
|
|
image: newsblur/newsblur_python3
|
2021-03-08 19:04:44 -05:00
|
|
|
command: "celery worker -A newsblur_web --loglevel=INFO"
|
2020-10-04 17:41:04 +07:00
|
|
|
volumes:
|
2021-04-03 12:32:42 -05:00
|
|
|
- ${PWD}:/srv/newsblur
|
2020-10-04 17:41:04 +07:00
|
|
|
environment:
|
|
|
|
- DOCKERBUILD=True
|
|
|
|
user: "${CURRENT_UID}:${CURRENT_GID}"
|
|
|
|
|
|
|
|
haproxy:
|
2020-10-13 22:03:25 +07:00
|
|
|
domainname: 'nb.local.com'
|
2020-10-04 17:41:04 +07:00
|
|
|
container_name: haproxy
|
2021-04-01 17:01:05 -04:00
|
|
|
image: haproxy:latest
|
2020-10-04 17:41:04 +07:00
|
|
|
depends_on:
|
|
|
|
- nginx
|
|
|
|
- newsblur_web
|
2021-03-16 19:34:11 -04:00
|
|
|
- newsblur_node
|
2021-04-01 17:01:05 -04:00
|
|
|
- imageproxy
|
2021-03-08 14:14:15 -05:00
|
|
|
- db_redis
|
2021-03-08 17:39:10 -05:00
|
|
|
- db_postgres
|
|
|
|
- db_elasticsearch
|
|
|
|
- db_mongo
|
2020-10-04 17:41:04 +07:00
|
|
|
ports:
|
|
|
|
- 80:80
|
|
|
|
- 443:443
|
|
|
|
- 1936:1936
|
|
|
|
volumes:
|
2021-02-17 08:32:23 -05:00
|
|
|
- ./docker/haproxy/haproxy.docker-compose.cfg:/usr/local/etc/haproxy/haproxy.cfg
|
2021-04-03 12:32:42 -05:00
|
|
|
- ${PWD}:/srv/newsblur
|
2021-04-01 17:01:05 -04:00
|
|
|
|
2021-03-29 14:25:09 -05:00
|
|
|
netdata:
|
|
|
|
container_name: netdata
|
|
|
|
image: netdata/netdata
|
|
|
|
ports:
|
|
|
|
- 19999:19999
|
2021-04-02 09:57:31 -05:00
|
|
|
environment:
|
2021-04-07 10:22:01 -05:00
|
|
|
- MONITOR_URL=https://haproxy/monitor
|
2021-03-29 14:25:09 -05:00
|
|
|
volumes:
|
|
|
|
- ./docker/netdata/netdatalib:/var/lib/netdata
|
|
|
|
- ./docker/netdata/netdatacache:/var/cache/netdata
|
2021-04-06 13:33:30 -05:00
|
|
|
- ./docker/netdata/netdataconfig/netdata.conf:/etc/netdata/netdata.conf
|
2021-04-02 09:57:31 -05:00
|
|
|
- ./docker/netdata/netdataconfig/python.d.conf:/usr/lib/netdata/conf.d/python.d.conf
|
2021-04-08 10:01:14 -05:00
|
|
|
- ./docker/netdata/netdataconfig/conf/:/usr/lib/netdata/conf.d/python.d/
|
2021-04-12 12:18:51 -05:00
|
|
|
- ./docker/netdata/netdataconfig/charts/newsblur.chart.py:/usr/libexec/netdata/python.d/newsblur.chart.py
|
2021-04-08 10:01:14 -05:00
|
|
|
|