When I updated I forgot to mount config json to store it externally.
Unsolved Docker compose
daniel coscione last edited by
hi, i would like to install nodebb with mongo db on docker via docker-compose. I don't find any working example, I always get connection refused http://127.0.0.1:27017 ... has anyone created a docker compose to share? Thank you
@daniel-coscione It seems the default docker-compose was made to use another container for routing - it uses
4567, which means it will be accessible to other containers but not the host machine.
If you want to use local nginx (without containerizing it) or another reverse proxy you can add this to nodebb service configuration:
ports: - '127.0.0.1:4567:4567'
If you want to use a containerized reverse proxy instead then you'll need to add it as a service to docker-compose. For example you can look at this guide to set up Traefik: https://doc.traefik.io/traefik/user-guides/docker-compose/basic-example/ (just note that you'll need to add
traefik.http.services.nodebb.loadbalancer.server.port=4567label to nodebb service since that is the port NodeBB will be listening on). They also have some docker-compose exmaples with TLS from Letsencrypt.
While it's not a good idea, you can also expose NodeBB by itself by just using the same ports directive as with local reverse proxy, but without binding to localhost:
ports: - '4567:4567'