I’m trying to install Newsblur through docker but newsblur_1 dosen’t start
ive tried running “docker-compose up”
please help to get started with this project
docker error log
newsblur_1 | [2021-06-12 17:23:41 +0000] [1] [INFO] Starting gunicorn 19.7.0 newsblur_1 | [2021-06-12 17:23:41 +0000] [1] [INFO] Listening at: http://0.0.0.0:8000 (1) newsblur_1 | [2021-06-12 17:23:41 +0000] [1] [INFO] Using worker: sync newsblur_1 | [2021-06-12 17:23:41 +0000] [10] [INFO] Booting worker with pid: 10 newsblur_1 | [2021-06-12 17:23:41 +0000] [10] [ERROR] Exception in worker process newsblur_1 | Traceback (most recent call last): newsblur_1 | File "/usr/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 578, in spawn_worker newsblur_1 | worker.init_process() newsblur_1 | File "/usr/local/lib/python2.7/site-packages/gunicorn/workers/base.py", line 126, in init_process newsblur_1 | self.load_wsgi() newsblur_1 | File "/usr/local/lib/python2.7/site-packages/gunicorn/workers/base.py", line 135, in load_wsgi newsblur_1 | self.wsgi = self.app.wsgi() newsblur_1 | File "/usr/local/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi newsblur_1 | self.callable = self.load() newsblur_1 | File "/usr/local/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load newsblur_1 | return self.load_wsgiapp() newsblur_1 | File "/usr/local/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp newsblur_1 | return util.import_app(self.app_uri) newsblur_1 | File "/usr/local/lib/python2.7/site-packages/gunicorn/util.py", line 376, in import_app newsblur_1 | __import__(module) newsblur_1 | ImportError: No module named wsgi newsblur_1 | [2021-06-12 17:23:41 +0000] [10] [INFO] Worker exiting (pid: 10) newsblur_1 | [2021-06-12 17:23:41 +0000] [1] [INFO] Shutting down: Master newsblur_1 | [2021-06-12 17:23:41 +0000] [1] [INFO] Reason: Worker failed to boot. newsblur-master_newsblur_1 exited with code 3
Looks like you’re on the master branch. Try again on the dashboard3 branch. Master is still on python 2.7 but dashboard3 is python 3.9. I’m launching python 3 in about a week, but until then dashboard3 is the answer. Happy to fix anything there, although its been tested a number of times now by other enterprising users.
Some services didn’t work due to the error Docker-compose: volume name is too short, names should be at least two alphanumeric characters - Stack Overflow
so I made changes in the docker-compose file
version: '2'
services:
newsblur_web:
hostname: nb.com
container_name: newsblur_web
image: newsblur/newsblur_${NEWSBLUR_BASE:-python3}:latest
environment:
- DOCKERBUILD=True
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
expose:
- 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:
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:
- ${PWD}/node/:/srv
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
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:
image: redis:3.2.6
ports:
- 6579:6579
container_name: db_redis
restart: unless-stopped
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
db_elasticsearch:
container_name: db_elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch:7.11.1
mem_limit: 512mb
restart: unless-stopped
environment:
- discovery.type=single-node
ports:
- 9200:9200
- 9300:9300
volumes:
- ./docker/volumes/elasticsearch:/elasticsearch/dat
- ./config/elasticsearch/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
db_mongo:
container_name: db_mongo
image: mongo:3.6
restart: unless-stopped
ports:
- 29019:29019
command: mongod --smallfiles --port 29019
volumes:
- ./docker/volumes/db_mongo:/data/db
task_celery:
container_name: task_celery
image: newsblur/newsblur_python3
command: "celery worker -A newsblur_web -B --loglevel=INFO"
restart: unless-stopped
volumes:
- ${PWD}/:/srv/newsblur
environment:
- DOCKERBUILD=True
user: "${CURRENT_UID}:${CURRENT_GID}"
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
it did made it start partially but had many errors, providing the explanations will be helpful
I assume you added the trailing slash to the PWD volume name. I worry that’ll break existing installations so I’m not sure we can use it. But using PWD is such a common setup that I hope we don’t have to resort to what looks like a breaking change.
As for the errors, can you post them? I want to see what’s going wrong.
log
I’m pasting it here due to character limit docker-log - Pastebin.com
yeah
WARNING: The PWD variable is not set. Defaulting to a blank string.
WARNING: The CURRENT_UID variable is not set. Defaulting to a blank string.
WARNING: The CURRENT_GID variable is not set. Defaulting to a blank string.
this may be causing errors can you provide a solution to fix them as i couldn’t figureout what it means , by providing a trailing / with creates all services if not it dosen’t creates all services .
without trailing / it
WARNING: The PWD variable is not set. Defaulting to a blank string.
WARNING: The CURRENT_UID variable is not set. Defaulting to a blank string.
WARNING: The CURRENT_GID variable is not set. Defaulting to a blank string.
db_postgres is up-to-date
db_mongo is up-to-date
Recreating task_celery ...
imageproxy is up-to-date
db_elasticsearch is up-to-date
db_redis is up-to-date
node is up-to-date
Recreating newsblur_web ... error
Recreating task_celery ... error
ERROR: for newsblur_web Cannot create container for service newsblur_web: create .: volume name is too short, names should be at least two alphanumeric characters
ERROR: for task_celery Cannot create container for service task_celery: create .: volume name is too short, names should be at least two alphanumeric characters
ERROR: for newsblur_web Cannot create container for service newsblur_web: create .: volume name is too short, names should be at least two alphanumeric characters
ERROR: for task_celery Cannot create container for service task_celery: create .: volume name is too short, names should be at least two alphanumeric characters
ERROR: Encountered errors while bringing up the project.
Did you use docker-compuse up
or make nb
? You need to run the make nb
command as that sets up some variables. Let me know if that fixes some warnings.
I use windows I am on branch dashboard3
I tried using make
process_begin: CreateProcess(NULL, id -u, ...) failed.
Makefile:2: pipe: No such file or directory
process_begin: CreateProcess(NULL, id -g, ...) failed.
Makefile:3: pipe: No such file or directory
docker pull newsblur/newsblur_python3
Using default tag: latest
latest: Pulling from newsblur/newsblur_python3
Digest: sha256:bf9f5abd8274aaef37e1fd27c8ad4649baeb6ae18ab50b961912f99d1e1e1b86
Status: Image is up to date for newsblur/newsblur_python3:latest
docker.io/newsblur/newsblur_python3:latest
docker pull newsblur/newsblur_node
Using default tag: latest
latest: Pulling from newsblur/newsblur_node
Digest: sha256:dc0fc2907850b37034c75bd6cd2534669bcf3b5620373eee266116c0ce422f61
Status: Image is up to date for newsblur/newsblur_node:latest
docker.io/newsblur/newsblur_node:latest
docker pull newsblur/newsblur_monitor
Using default tag: latest
latest: Pulling from newsblur/newsblur_monitor
Digest: sha256:81d48f8b6acb27ef135607669725c21734651ee99e88837f10aefd48770ab944
Status: Image is up to date for newsblur/newsblur_monitor:latest
docker.io/newsblur/newsblur_monitor:latest
CURRENT_UID= CURRENT_GID= docker-compose down
'CURRENT_UID' is not recognized as an internal or external command,
operable program or batch file.
make: [Makefile:23: nb] Error 1 (ignored)
[[ -d config/certificates ]] && echo "keys exist" || make keys
'[[' is not recognized as an internal or external command,
operable program or batch file.
make[1]: Entering directory 'D:/recsys/NewsBlur'
process_begin: CreateProcess(NULL, id -u, ...) failed.
Makefile:2: pipe: No such file or directory
process_begin: CreateProcess(NULL, id -g, ...) failed.
Makefile:3: pipe: No such file or directory
mkdir config/certificates
The syntax of the command is incorrect.
make[1]: [Makefile:62: keys] Error 1 (ignored)
openssl dhparam -out config/certificates/dhparam-2048.pem 2048
process_begin: CreateProcess(NULL, openssl dhparam -out config/certificates/dhparam-2048.pem 2048, ...) failed.
make (e=2): The system cannot find the file specified.
make[1]: [Makefile:63: keys] Error 2 (ignored)
openssl req -x509 -nodes -new -sha256 -days 1024 -newkey rsa:2048 -keyout config/certificates/RootCA.key -out config/certificates/RootCA.pem -subj "/C=US/CN=Example-Root-CA"
process_begin: CreateProcess(NULL, openssl req -x509 -nodes -new -sha256 -days 1024 -newkey rsa:2048 -keyout config/certificates/RootCA.key -out config/certificates/RootCA.pem -subj /C=US/CN=Example-Root-CA, ...) failed.
make (e=2): The system cannot find the file specified.
make[1]: [Makefile:64: keys] Error 2 (ignored)
openssl x509 -outform pem -in config/certificates/RootCA.pem -out config/certificates/RootCA.crt
process_begin: CreateProcess(NULL, openssl x509 -outform pem -in config/certificates/RootCA.pem -out config/certificates/RootCA.crt, ...) failed.
make (e=2): The system cannot find the file specified.
make[1]: [Makefile:65: keys] Error 2 (ignored)
openssl req -new -nodes -newkey rsa:2048 -keyout config/certificates/localhost.key -out config/certificates/localhost.csr -subj "/C=US/ST=YourState/L=YourCity/O=Example-Certificates/CN=localhost.local"
process_begin: CreateProcess(NULL, openssl req -new -nodes -newkey rsa:2048 -keyout config/certificates/localhost.key -out config/certificates/localhost.csr -subj /C=US/ST=YourState/L=YourCity/O=Example-Certificates/CN=localhost.local, ...) failed.
make (e=2): The system cannot find the file specified.
make[1]: [Makefile:66: keys] Error 2 (ignored)
openssl x509 -req -sha256 -days 1024 -in config/certificates/localhost.csr -CA config/certificates/RootCA.pem -CAkey config/certificates/RootCA.key -CAcreateserial -out config/certificates/localhost.crt
process_begin: CreateProcess(NULL, openssl x509 -req -sha256 -days 1024 -in config/certificates/localhost.csr -CA config/certificates/RootCA.pem -CAkey config/certificates/RootCA.key -CAcreateserial -out config/certificates/localhost.crt, ...) failed.
make (e=2): The system cannot find the file specified.
make[1]: [Makefile:67: keys] Error 2 (ignored)
cat config/certificates/localhost.crt config/certificates/localhost.key > config/certificates/localhost.pem
The system cannot find the path specified.
make[1]: [Makefile:68: keys] Error 1 (ignored)
/usr/bin/security add-trusted-cert -d -r trustAsRoot -k /Library/Keychains/System.keychain ./config/certificates/RootCA.crt
process_begin: CreateProcess(NULL, sh.exe -c "/usr/bin/security add-trusted-cert -d -r trustAsRoot -k /Library/Keychains/System.keychain ./config/certificates/RootCA.crt", ...) failed.
make (e=2): The system cannot find the file specified.
make[1]: [Makefile:69: keys] Error 2 (ignored)
make[1]: Leaving directory 'D:/recsys/NewsBlur'
cd node && npm install & cd ..
up to date, audited 302 packages in 2s
10 vulnerabilities (1 low, 3 moderate, 5 high, 1 critical)
To address issues that do not require attention, run:
npm audit fix
To address all issues possible (including breaking changes), run:
npm audit fix --force
Some issues need review, and may require choosing
a different dependency.
Run `npm audit` for details.
CURRENT_UID= CURRENT_GID= docker-compose up -d --build --remove-orphans
'CURRENT_UID' is not recognized as an internal or external command,
operable program or batch file.
make: [Makefile:26: nb] Error 1 (ignored)
docker-compose exec newsblur_web ./manage.py migrate
Error response from daemon: Container e8e0be451464542f3b63caedcdc2b3e25b6c0b04d4fb2ff9b1a22cf383650ebd is restarting, wait until the container is running
make: [Makefile:27: nb] Error 1 (ignored)
docker-compose exec newsblur_web ./manage.py loaddata config/fixtures/bootstrap.json
Error response from daemon: Container e8e0be451464542f3b63caedcdc2b3e25b6c0b04d4fb2ff9b1a22cf383650ebd is restarting, wait until the container is running
make: [Makefile:28: nb] Error 1 (ignored)
can you provide a faster way of contacting you as it is taking too long to solve this problem