• 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 ... has anyone created a docker compose to share? Thank you

  • Plugin & Theme Dev Community Rep

    @daniel-coscione It seems the default docker-compose was made to use another container for routing - it uses expose for port 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:

      - ''

    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=4567 label 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:

      - '4567:4567'

Suggested Topics

| | |

© 2014 – 2022 NodeBB, Inc. — Made in Canada.