@kyletryon I was thinking of using AWS too, sounds like a very appealing idea. I ended up going with a company called "Digital Ocean" And just recently got it all working on their Droplet service. Look into them too.
Run NodeBB in the Docker or Kubernetes
Hi all! I spent quite a lot of time to organize an automatic build of a Docker image compatible with persistent storage and k8s.
Now, it seems ready to use, you can check it on Github.
Due to one bug in the NodeBB codebase stable images currently won't run in docker, but beta tag work perfectly.
You can run the test lab using the snippet below.
docker run --name redis -d -p 6379:6379 redis docker run --name nodebb -d -p 4567:4567 \ -v /path/to/data:/data \ -e URL="http://mynodebb.com" \ -e DATABASE="redis" \ -e DB_NAME="0" \ -e DB_HOST="host.docker.internal" \ -e DB_PASSWORD="pass" \ -e DB_PORT="6379" \ nibrev/nodebb:beta
- Change /path/to/data according to the preferred location to save config.json, package.json, and uploads directory. After the first start container creates all necessary files and directories automatically, then you can edit /path/to/data/config.json and restart the container.
To update NodeBB just delete the container and run with new image version.
Any idea what the difference is between our Dockerfile and the one maintained by @nilsramsperger ?
The difference from official NodeBB Docker image:
- Support of persistent volume to store config.json, uploads, and package.json
- Support of ENV variables to initial (auto) installation
- Runs nodebb upgrade -sb on startup
In short, realized using docker best practices so the user can easily upgrade the image without data loss and issues.
The difference from the @nilsramsperger image (superficially):
- I'm realized autobuilds, in the Github and DockerHub always an actual version of stable and beta images.
- I wasn't included in any databases in the image.
- Kubernetes compatible.
PS. This test instance still alive to test how it works in the k8s.
최우성 last edited by
@rez0n I works great.
But how can I access admin?
There is no information about admin password.
@최우성 HI. As usually, NodeBB automatically generates admin password and echo it to the logs. You can access Docker container logs executing
docker logs nodebb
nodebb - means your container name
@rez0n It's very helpful.
Mib314 last edited by
Do you have a docker-composite version of your script?
I'm not very good at it.
Thank you in advance