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-27 09:59:00 +07:00
|
|
|
dns_search:
|
|
|
|
- nb.com
|
2020-10-04 17:41:04 +07:00
|
|
|
environment:
|
|
|
|
- DOCKERBUILD=True
|
|
|
|
stdin_open: true
|
|
|
|
tty: true
|
|
|
|
restart: always
|
|
|
|
depends_on:
|
2021-03-14 16:17:14 -05:00
|
|
|
db_mongo:
|
|
|
|
condition: service_started
|
|
|
|
db_postgres:
|
|
|
|
condition: service_healthy
|
|
|
|
db_redis:
|
|
|
|
condition: service_started
|
|
|
|
db_elasticsearch:
|
|
|
|
condition: service_started
|
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-09 12:07:43 -05:00
|
|
|
command: /bin/bash -c newsblur_web/entrypoint.sh
|
2020-10-04 17:41:04 +07:00
|
|
|
volumes:
|
|
|
|
- app-files:/srv/newsblur
|
2021-03-08 19:04:44 -05:00
|
|
|
|
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:
|
|
|
|
- newsblur_web
|
|
|
|
- favicons
|
2021-03-08 14:14:15 -05:00
|
|
|
- db_postgres
|
|
|
|
- db_redis
|
2020-10-04 17:41:04 +07:00
|
|
|
- db_mongo
|
2021-03-08 14:14:15 -05:00
|
|
|
- db_elasticsearch
|
2020-10-04 17:41:04 +07:00
|
|
|
- original_pages
|
|
|
|
- original_text
|
|
|
|
- node_websocket
|
|
|
|
environment:
|
|
|
|
- DOCKERBUILD=True
|
|
|
|
volumes:
|
2021-02-21 11:59:21 -05:00
|
|
|
- ./docker/nginx/nginx.local.conf:/etc/nginx/conf.d/nginx.conf
|
2020-10-04 17:41:04 +07:00
|
|
|
- app-files:/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-01-18 11:59:29 -05:00
|
|
|
image: elasticsearch:2.4.4
|
2016-08-28 20:42:07 -07:00
|
|
|
ports:
|
2021-03-08 19:04:44 -05:00
|
|
|
- 9200:9200
|
2018-10-07 12:04:20 -05:00
|
|
|
volumes:
|
|
|
|
- ./docker/volumes/elasticsearch:/usr/share/elasticsearch/data
|
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
|
|
|
|
|
|
|
|
original_pages:
|
|
|
|
image: newsblur/newsblur_node
|
|
|
|
container_name: node_original_page
|
|
|
|
environment:
|
|
|
|
- NODE_ENV=development
|
|
|
|
command: node original_page.js
|
|
|
|
ports:
|
|
|
|
- 3060:3060
|
|
|
|
volumes:
|
2021-03-09 12:00:06 -05:00
|
|
|
- node-files:/srv
|
2021-03-08 19:04:44 -05:00
|
|
|
|
2020-10-04 17:41:04 +07:00
|
|
|
original_text:
|
|
|
|
image: newsblur/newsblur_node
|
|
|
|
container_name: node_original_text
|
|
|
|
environment:
|
|
|
|
- NODE_ENV=development
|
|
|
|
ports:
|
|
|
|
- 4040:4040
|
2020-10-26 10:04:17 +07:00
|
|
|
command: node original_text.js
|
2020-10-04 17:41:04 +07:00
|
|
|
volumes:
|
2021-03-09 12:00:06 -05:00
|
|
|
- node-files:/srv
|
2020-10-04 17:41:04 +07:00
|
|
|
|
|
|
|
favicons:
|
|
|
|
image: newsblur/newsblur_node
|
|
|
|
container_name: node_favicons
|
|
|
|
environment:
|
|
|
|
- NODE_ENV=docker
|
2021-02-17 08:32:23 -05:00
|
|
|
- MONGODB_PORT=29019
|
2020-10-04 17:41:04 +07:00
|
|
|
ports:
|
|
|
|
- 3030:3030
|
|
|
|
command: node favicons.js
|
2020-10-13 22:03:25 +07:00
|
|
|
depends_on:
|
2021-03-08 14:14:15 -05:00
|
|
|
- db_postgres
|
2020-10-04 17:41:04 +07:00
|
|
|
volumes:
|
2021-03-09 12:00:06 -05:00
|
|
|
- node-files:/srv
|
2020-10-04 17:41:04 +07:00
|
|
|
|
|
|
|
node_websocket:
|
|
|
|
container_name: node_websocket
|
|
|
|
image: newsblur/newsblur_node
|
|
|
|
environment:
|
|
|
|
- NODE_ENV=docker
|
|
|
|
command: node unread_counts.js
|
|
|
|
stop_signal: HUP
|
|
|
|
ports:
|
|
|
|
- 8888:8888
|
|
|
|
volumes:
|
2021-03-09 12:00:06 -05:00
|
|
|
- node-files:/srv
|
2020-10-04 17:41:04 +07:00
|
|
|
|
|
|
|
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:
|
|
|
|
- app-files:/srv/newsblur
|
|
|
|
- ./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:
|
|
|
|
- app-files:/srv/newsblur
|
|
|
|
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-03-09 11:09:52 -05:00
|
|
|
image: haproxy:1.8.22
|
2020-10-04 17:41:04 +07:00
|
|
|
depends_on:
|
|
|
|
- nginx
|
|
|
|
- newsblur_web
|
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
|
2020-10-04 17:41:04 +07:00
|
|
|
- app-files:/srv/newsblur
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
app-files:
|
|
|
|
driver_opts:
|
|
|
|
type: nfs
|
2021-03-09 11:40:12 -05:00
|
|
|
device: ${PWD}
|
2020-10-04 17:41:04 +07:00
|
|
|
o: bind
|
|
|
|
node-files:
|
|
|
|
driver_opts:
|
|
|
|
type: nfs
|
2021-03-09 11:40:12 -05:00
|
|
|
device: ${PWD}/node
|
2021-01-22 19:22:45 -05:00
|
|
|
o: bind
|