2016-08-28 20:42:07 -07:00
|
|
|
services:
|
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-05-06 15:49:59 -04:00
|
|
|
image: newsblur/newsblur_${NEWSBLUR_BASE:-python3}:latest
|
2024-06-30 20:27:30 -04:00
|
|
|
build:
|
|
|
|
context: /srv/newsblur
|
|
|
|
dockerfile: docker/newsblur_base_image.Dockerfile
|
2023-10-11 12:54:12 -04:00
|
|
|
# user: "${CURRENT_UID}:${CURRENT_GID}"
|
2024-06-30 20:27:30 -04:00
|
|
|
environment:
|
2020-10-04 17:41:04 +07:00
|
|
|
- DOCKERBUILD=True
|
2023-12-27 08:24:49 -05:00
|
|
|
- DISCOVER_DATA_FOLDER=/srv/newsblur/docker/volumes/discover
|
2021-12-08 12:52:35 -05:00
|
|
|
- RUNWITHMAKEBUILD=${RUNWITHMAKEBUILD?Use the `make` command instead of docker CLI}
|
2020-10-04 17:41:04 +07:00
|
|
|
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-07-29 16:24:56 -04:00
|
|
|
ports:
|
|
|
|
- 8000: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
|
2024-06-30 20:27:30 -04:00
|
|
|
volumes:
|
2021-04-03 12:32:42 -05:00
|
|
|
- ${PWD}:/srv/newsblur
|
2021-03-16 20:00:55 -04:00
|
|
|
|
|
|
|
newsblur_node:
|
|
|
|
container_name: node
|
2022-01-10 09:51:46 -05:00
|
|
|
image: newsblur/newsblur_node:latest
|
|
|
|
user: "${CURRENT_UID}:${CURRENT_GID}"
|
2021-03-16 20:00:55 -04:00
|
|
|
environment:
|
|
|
|
- NODE_ENV=docker
|
|
|
|
- MONGODB_PORT=29019
|
|
|
|
command: node newsblur.js
|
|
|
|
restart: unless-stopped
|
|
|
|
stop_signal: HUP
|
2024-06-30 20:27:30 -04:00
|
|
|
depends_on:
|
2021-03-16 20:00:55 -04:00
|
|
|
- db_mongo
|
|
|
|
- db_postgres
|
|
|
|
- db_redis
|
|
|
|
ports:
|
|
|
|
- 8008:8008
|
2024-06-30 20:27:30 -04:00
|
|
|
volumes:
|
2021-04-03 12:32:42 -05:00
|
|
|
- ${PWD}/node:/srv
|
2024-02-25 17:13:38 -05:00
|
|
|
- ${PWD}/node/originals:/srv/originals
|
2024-06-30 20:27:30 -04:00
|
|
|
|
2021-04-01 17:01:05 -04:00
|
|
|
imageproxy:
|
|
|
|
container_name: imageproxy
|
2023-04-09 16:10:36 -04:00
|
|
|
# image: ghcr.io/willnorris/imageproxy:latest # Enable if you don't need arm64 and want the original imageproxy
|
2024-06-30 20:27:30 -04:00
|
|
|
image: yusukeito/imageproxy:v0.11.2 # Enable if you want arm64
|
2022-01-10 09:51:46 -05:00
|
|
|
user: "${CURRENT_UID}:${CURRENT_GID}"
|
2021-04-01 17:01:05 -04:00
|
|
|
entrypoint: /app/imageproxy -addr 0.0.0.0:8088 -cache /tmp/imageproxy -verbose
|
|
|
|
restart: unless-stopped
|
|
|
|
ports:
|
|
|
|
- 8088:8088
|
|
|
|
volumes:
|
|
|
|
- /tmp:/tmp/imageproxy
|
2024-06-30 20:27:30 -04: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
|
2021-06-04 21:41:40 -04:00
|
|
|
restart: unless-stopped
|
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
|
2024-06-30 20:27:30 -04:00
|
|
|
environment:
|
2020-10-04 17:41:04 +07:00
|
|
|
- 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
|
2021-06-04 21:41:40 -04:00
|
|
|
restart: unless-stopped
|
2016-08-28 20:42:07 -07:00
|
|
|
environment:
|
|
|
|
- POSTGRES_USER=newsblur
|
|
|
|
- POSTGRES_PASSWORD=newsblur
|
2021-05-06 15:49:59 -04:00
|
|
|
# healthcheck:
|
|
|
|
# test: ["CMD-SHELL", "pg_isready -U newsblur"]
|
|
|
|
# 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:
|
2022-01-10 09:51:46 -05:00
|
|
|
container_name: db_redis
|
2021-10-20 16:46:19 -04:00
|
|
|
image: redis:latest
|
2016-08-28 20:42:07 -07:00
|
|
|
ports:
|
2021-03-08 17:39:10 -05:00
|
|
|
- 6579:6579
|
2021-06-04 21:41:40 -04:00
|
|
|
restart: unless-stopped
|
2018-10-07 12:04:20 -05:00
|
|
|
volumes:
|
2022-01-11 17:23:14 -05:00
|
|
|
- ./docker/redis/redis.conf:/etc/redis/redis.conf
|
|
|
|
- ./docker/redis/redis_server.conf:/usr/local/etc/redis/redis_replica.conf
|
|
|
|
- ./docker/volumes/redis:/data
|
2021-03-08 19:47:24 -05:00
|
|
|
command: redis-server /etc/redis/redis.conf --port 6579
|
2024-06-30 20:27:30 -04:00
|
|
|
|
2023-11-10 17:13:46 -05:00
|
|
|
# Prod Redis
|
|
|
|
# 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_prod:/data
|
|
|
|
# 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
|
2022-04-03 19:44:35 -06:00
|
|
|
image: docker.elastic.co/elasticsearch/elasticsearch:7.16.3
|
2021-04-01 17:01:05 -04:00
|
|
|
mem_limit: 512mb
|
2021-06-04 21:41:40 -04:00
|
|
|
restart: unless-stopped
|
2021-04-01 17:01:05 -04:00
|
|
|
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:
|
2022-12-26 19:17:14 -05:00
|
|
|
- ./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
|
|
|
|
2022-12-26 19:17:14 -05:00
|
|
|
dejavu:
|
|
|
|
container_name: dejavu
|
|
|
|
image: appbaseio/dejavu:3.6.0
|
|
|
|
restart: unless-stopped
|
|
|
|
ports:
|
|
|
|
- 1358:1358
|
|
|
|
|
2020-10-04 17:41:04 +07:00
|
|
|
db_mongo:
|
|
|
|
container_name: db_mongo
|
2022-05-17 09:42:04 -04:00
|
|
|
image: mongo:4.0
|
2023-03-01 09:18:29 -05:00
|
|
|
user: mongodb
|
2021-06-04 21:41:40 -04:00
|
|
|
restart: unless-stopped
|
2016-08-28 20:42:07 -07:00
|
|
|
ports:
|
2020-10-25 12:48:17 +07:00
|
|
|
- 29019:29019
|
2022-05-10 20:58:47 -04:00
|
|
|
command: mongod --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
|
|
|
|
|
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
|
2022-01-10 09:51:46 -05:00
|
|
|
user: "${CURRENT_UID}:${CURRENT_GID}"
|
2021-04-22 16:27:57 -04:00
|
|
|
command: "celery worker -A newsblur_web -B --loglevel=INFO"
|
2021-06-04 21:41:40 -04:00
|
|
|
restart: unless-stopped
|
2020-10-04 17:41:04 +07:00
|
|
|
volumes:
|
2021-04-03 12:32:42 -05:00
|
|
|
- ${PWD}:/srv/newsblur
|
2024-06-30 20:27:30 -04:00
|
|
|
environment:
|
2020-10-04 17:41:04 +07:00
|
|
|
- DOCKERBUILD=True
|
2023-12-27 08:24:49 -05:00
|
|
|
- DISCOVER_DATA_FOLDER=/srv/newsblur/docker/volumes/discover
|
2020-10-04 17:41:04 +07:00
|
|
|
|
|
|
|
haproxy:
|
|
|
|
container_name: haproxy
|
2021-04-01 17:01:05 -04:00
|
|
|
image: haproxy:latest
|
2021-06-04 21:41:40 -04:00
|
|
|
restart: unless-stopped
|
2024-06-30 20:27:30 -04:00
|
|
|
depends_on:
|
2020-10-04 17:41:04 +07:00
|
|
|
- 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
|