Hi there !
There are big differences between OpenShift version 2 and 3, now the service work mostly with Docker and Kubernetes features, instead of simple gears.
So here's my attempt to install NodeBB and Redis database using Openshift.
First I created a new project :
oc new-project community-dev --display-name="Community Development Project" --description="Development project for community using NodeBB and Redis"
Then I built and deployed a Redis instance :
oc new-app --docker-image=nodebb/docker:centos-redis --name="redis" --labels="dedicated=nodebb"
NodeBB build :
oc new-app --image-stream=nodejs:4 --code=https://github.com/NodeBB/NodeBB.git#v1.1.2 --name="nodebb" -e database=redis,redis__host=redis,redis__database=0,port=8080
I also gived to Redis a persistent storage volume
oc volume dc/redis --add --name="redis" -t pvc --claim-name="redis" --claim-size=1G
I finally exposed the nodebb service using port 8080
oc expose service nodebb -l app=nodebb
This gives me an URL to see nodebb instance
But the page still like this
I was wondering if the problem occurs because NodeBB tries to kill the process node loader.js
, since it's the process used in npm start
which is the default command to start with OpenShift. If we kill this process, the pod is automatically restarted.
This is the log from the pod :
Environment:
DEV_MODE=false
NODE_ENV=production
DEBUG_PORT=5858
Launching via npm...
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info prestart [email protected]
npm info start [email protected]
> [email protected] start /opt/app-root/src
> node loader.js
1/9 18:56 [32] - info: Launching web installer on port 8080
1/9 18:56 [32] - info: Web installer listening on http://0.0.0.0:8080
Is there a possiblity to start nodebb in an other way without forking the github repo ?
Thank you.