cheminfo / cheminfo/roc-eln-docker
Problem with the roc-eln-docker_rest-on-couch
- Dominant language
- JavaScript
- Stars
- 8
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I am a beginner with docker installation.
I am working with Windows, I have installed WSL2 with Ubuntu distribution and Docker Desktop + Visual Code.
I followed the instruction for the installation of the ELN. The containers appear correctly in Docker Desktop but the rest-on-couch one is red and RESTARTING is written below. When I inspect this container, I have the following message:
```
Error: There must be at least one app key defined in REST_ON_COUCH_APP_KEYS
at Object. (/rest-on-couch/config.js:7:9)
at Module._compile (internal/modules/cjs/loader.js:1068:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
at Module.load (internal/modules/cjs/loader.js:933:32)
at Function.Module._load (internal/modules/cjs/loader.js:774:14)
at Module.require (internal/modules/cjs/loader.js:957:19)
at require (internal/modules/cjs/helpers.js:88:18)
at getHomeConfig (/rest-on-couch-source/src/config/home.js:33:18)
at getConfig (/rest-on-couch-source/src/config/config.js:19:7)
at Object. (/rest-on-couch-source/src/config/config.js:43:22)
```
In addition, I am not sure to have correctly modified the .env file
```
# Local port from which the application will be served
NGINX_PORT=80
# Access to CouchDB admin interface. This port shouldn't be accessible from everywhere
COUCHDB_PORT=4445
# Directory where CouchDB data will be
COUCHDB_DATA_DIRECTORY=./couchdb-data
# Password for the admin user on CouchDB
COUCHDB_ADMIN_PASSWORD=XXXX
# Password for the printer user on CouchDB
COUCHDB_PRINTER_PASSWORD=XXXX
# Password for the rest-on-couch user used by the server
COUCHDB_ROC_SERVER_PASSWORD=XXXX
# Password for the admin@cheminfo.org user
COUCHDB_ROC_ADMIN_PASSWORD=XXXX
# Debug log level for rest-on-couch services
DEBUG=couch:error,couch:warn,couch:debug
# Name of the session cookie
REST_ON_COUCH_SESSION_KEY=koa:roc-eln
# Domain name(s) that the cookie will be bound to
# Example: server.example.com
REST_ON_COUCH_SESSION_DOMAIN=localhost
# Same as REST_ON_COUCH_SESSION_DOMAIN, only with http:// or https://
# Multiple origins can be specified, separated by a comma
# Example: https://server1.example.com,https://server2.example.com
REST_ON_COUCH_ORIGINS=http://localhost:3000
# Comma-separated keys for signing session cookies
# Each key must be at least 32 characters long
# Can be randomly generated with 'openssl rand -hex 16'
REST_ON_COUCH_APP_KEYS=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Comma-separated list of users that have full admin access to rest-on-couch
# admin@cheminfo.org always has admin access even if this option is not set
REST_ON_COUCH_ADMIN_USERS=
# If your application is behind a reverse proxy, add the prefix here
# Example: app is available at https://server.example.com/my/app. value must be '/my/app'
# When using virtual host it will normaly stay empty
REST_ON_COUCH_PROXY_PATH=
```
And my docker-compose file is the following
```
version: "3.3"
# Uncomment if you need to fix the subnet range
#networks:
# default:
# driver: bridge
# ipam:
# driver: default
# config:
# - subnet: 192.168.231.0/24
# gateway: 192.168.231.1
services:
nginx-proxy:
image: docker.io/nginx:1.14-alpine
ports:
- "80:80"
depends_on:
- rest-on-couch
- flavor-builder
- printer-proxy
volumes:
- ${PWD}/nginx/nginx.conf:/etc/nginx/conf.d/default.conf
- ${PWD}/www:/data/www/
- ${PWD}/nginx/cache:/cache
- ${PWD}/nginx/certs:/certs
restart: always
# uncomment for debugging
# command: [nginx-debug, '-g', 'daemon off;']
couchdb:
image: docker.io/couchdb:2.3.1
ports:
- "127.0.0.1:4445:5984"
environment:
# CouchDB admin credentials
COUCHDB_USER: XXXX
COUCHDB_PASSWORD: XXXX
volumes:
- ./couchdb-data:/opt/couchdb/data
- ${PWD}/couchdb/couch.ini:/opt/couchdb/etc/local.d/couch.ini
restart: always
rest-on-couch:
build: ./rest-on-couch
command: "/start.sh"
environment:
# CouchDB admin credentials
COUCHDB_USER: XXXX
COUCHDB_PASSWORD: XXXX
expose:
- 3000
volumes:
- ./rest-on-couch-home:/rest-on-couch
depends_on:
- couchdb
restart: always
env_file:
- .env
# rest-on-couch-import:
# build: ./rest-on-couch
# command: >
# bash -c "node /rest-on-couch-source/bin/rest-on-couch-import.js --continuous"
# environment:
# # CouchDB admin credentials
# COUCHDB_USER: admin
# COUCHDB_PASSWORD: ${COUCHDB_ADMIN_PASSWORD}
# volumes:
# - ./rest-on-couch-home:/rest-on-couch
# - ./rest-on-couch-home:/rest-on-couch-home
# depends_on:
# - couchdb
# - rest-on-couch # make sure that not both try to create the db at the same time
# restart: always
# env_file:
# - .env
# To enable the service, uncomment here and edit ./nginx-proxy/conf.nginx
# rest-on-couch-file-drop:
# build: ./rest-on-couch
# command: node /rest-on-couch-source/bin/rest-on-couch-file-drop.js
# depends_on:
# - couchdb
# expose:
# - 3001
# restart: always
# env_file:
# - .env
flavor-builder:
image: docker.io/cheminfo/eln-flavor-builder:v2.0.2
environment:
DEBUG: "flavor-builder*"
COUCHDB_USER: XXXX
COUCHDB_PASSWORD: XXXX
volumes:
- ${PWD}/flavor-builder-config.json:/flavor-config.json
- ${PWD}/www:/var/www/html/
# - ./flavor-builder-on-tabs-config.json:/on-tabs-config.json
depends_on:
- couchdb
- rest-on-couch
restart: always
printer-proxy:
image: docker.io/cheminfo/eln-printer-proxy:v1.3.4
command: pm2-docker start /pm2-proxy.yml
volumes:
- ${PWD}/printer-proxy-config.yml:/config.yml
# Uncomment to use a custom pm2 config
# This should normally not be necessary
#- ./pm2/printer-proxy.yml:/pm2-proxy.yml
depends_on:
- rest-on-couch
expose:
- 7770
restart: always
```
Your advice and help will be really appreciated
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.