NewsBlur/docker-compose.yml

199 lines
4.5 KiB
YAML
Raw Normal View History

version: '3'
services:
newsblur_web:
hostname: nb.com
container_name: newsblur_web
image: newsblur/newsblur_python3:latest
dns_search:
- nb.com
environment:
- DOCKERBUILD=True
stdin_open: true
tty: true
restart: always
depends_on:
db_mongo:
condition: service_started
db_postgres:
condition: service_healthy
db_redis:
condition: service_started
db_elasticsearch:
condition: service_started
ulimits:
nproc: 10000
nofile:
soft: 10000
hard: 10000
expose:
- 8000
# 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
volumes:
- app-files:/srv/newsblur
nginx:
container_name: nginx
2021-01-18 11:59:29 -05:00
image: nginx:1.19.6
ports:
- 81:81
depends_on:
- newsblur_web
- favicons
2021-03-08 14:14:15 -05:00
- db_postgres
- db_redis
- db_mongo
2021-03-08 14:14:15 -05:00
- db_elasticsearch
- original_pages
- original_text
- node_websocket
environment:
- DOCKERBUILD=True
volumes:
- ./docker/nginx/nginx.local.conf:/etc/nginx/conf.d/nginx.conf
- app-files:/srv/newsblur
2021-03-08 14:14:15 -05:00
db_postgres:
container_name: db_postgres
image: postgres:13.1
environment:
- POSTGRES_USER=newsblur
- POSTGRES_PASSWORD=newsblur
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
ports:
- 5434:5432
volumes:
- ./docker/volumes/postgres:/var/lib/postgresql/data
2021-03-08 14:14:15 -05:00
db_redis:
2021-01-18 11:59:29 -05:00
image: redis:3.2.6
ports:
2021-03-08 17:39:10 -05:00
- 6579:6579
2021-03-08 14:14:15 -05:00
container_name: db_redis
volumes:
- ./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
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
ports:
- 9200:9200
volumes:
- ./docker/volumes/elasticsearch:/usr/share/elasticsearch/data
db_mongo:
container_name: db_mongo
2021-01-24 22:30:51 -05:00
image: mongo:3.6
ports:
- 29019:29019
command: mongod --smallfiles --port 29019
volumes:
- ./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:
- node-files:/srv
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
volumes:
- node-files:/srv
favicons:
image: newsblur/newsblur_node
container_name: node_favicons
environment:
- NODE_ENV=docker
- MONGODB_PORT=29019
ports:
- 3030:3030
command: node favicons.js
depends_on:
2021-03-08 14:14:15 -05:00
- db_postgres
volumes:
- node-files:/srv
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:
- node-files:/srv
celerybeat:
container_name: celerybeat
image: newsblur/newsblur_python3
command: bash -c "mkdir -p data && celery beat -A newsblur_web --schedule=/srv/newsblur/data/celerybeat-schedule.db --loglevel=INFO --pidfile=/srv/celeryd.pid"
environment:
- DOCKERBUILD=True
volumes:
- app-files:/srv/newsblur
- ./config:/etc/supervisor/conf.d/
task_celery:
container_name: task_celery
image: newsblur/newsblur_python3
command: "celery worker -A newsblur_web --loglevel=INFO"
volumes:
- app-files:/srv/newsblur
environment:
- DOCKERBUILD=True
user: "${CURRENT_UID}:${CURRENT_GID}"
haproxy:
domainname: 'nb.local.com'
container_name: haproxy
2021-03-09 11:09:52 -05:00
image: haproxy:1.8.22
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
ports:
- 80:80
- 443:443
- 1936:1936
volumes:
- ./docker/haproxy/haproxy.docker-compose.cfg:/usr/local/etc/haproxy/haproxy.cfg
- app-files:/srv/newsblur
volumes:
app-files:
driver_opts:
type: nfs
device: ${PWD}
o: bind
node-files:
driver_opts:
type: nfs
device: ${PWD}/node
o: bind