Skip to content
  • 1 Votes
    2 Posts
    322 Views
    ernstkiE
    @nhl-pl Good resource, thanks for sharing!
  • Improving docker support

    General Discussion
    5
    4 Votes
    5 Posts
    479 Views
    SinisterSpatulaS
    I got it working! github.com/SinisterSpatula/.docker-dev I think we can definitely improve this, but I at least want to share my work in case there are others that want to use docker to develop a plugin, as it seems no one has really documented or shared their work when it comes to this, at least that I could find! [image: 1719177664679-a4dfa775-201c-4413-9926-f1ae9954810a-image.png]
  • Docker deployment issue

    Unsolved Technical Support
    1
    0 Votes
    1 Posts
    224 Views
    pedrogaudencioP
    I'm trying to setup a Digital Ocean app using the Dockerfile below - this is based on the original Dockerfile from the Docker container packages. I managed to get this working locally having little changes made to the original Dockerfile, since I'm using a custom template and this is pulled from a public git repo on the NodeBB package.json file, so no major changes from the normal setup. Here's the Dockerfile I'm using: FROM --platform=linux/amd64 node:lts as npm RUN mkdir -p /usr/src/build && \ chown -R node:node /usr/src/build WORKDIR /usr/src/build ARG NODE_ENV=production ENV NODE_ENV $NODE_ENV # nodebb-docker/ folder contains the repo https://github.com/NodeBB/NodeBB COPY --chown=node:node nodebb-docker/install/package.json /usr/src/build/package.json USER node RUN npm install --omit=dev FROM --platform=linux/amd64 node:lts RUN mkdir -p /usr/src/app && \ chown -R node:node /usr/src/app WORKDIR /usr/src/app ARG NODE_ENV ENV NODE_ENV $NODE_ENV COPY --chown=node:node --from=npm /usr/src/build /usr/src/app USER node RUN npm rebuild && \ npm cache clean --force COPY --chown=node:node nodebb-docker /usr/src/app ENV NODE_ENV=production \ daemon=false \ silent=false EXPOSE 4567 CMD test -n "${SETUP}" && ./nodebb setup || node ./nodebb build; node ./nodebb start Even though the build is running successfully (locally and in production) and I can run the container locally, I get this message on failed deployment: [2023-07-27 13:56:26] 2023-07-27T13:56:26.239Z [3] - info: Launching web installer on port 4567 [] Anyone has had this before? Thank you
  • 1 Votes
    2 Posts
    614 Views
    Gliding9426G
    @julian said in Now publishing images to GitHub Container Registry + Registry migration FAQ: ghcr.io/NodeBB/NodeBB (case insensitive) thanks, just changed the repository, but i got error from docker compose, it told me it must be all lowercase (not case insensitive)
  • What to backup? Just config and uploads?

    Technical Support
    5
    0 Votes
    5 Posts
    430 Views
    julianJ
    @Gliding9426 Yeah, NodeBB can fork itself and maintain its own state if you prefer not to use separate tooling.
  • NodeBB Container Images

    NodeBB Development
    1
    +0
    6 Votes
    1 Posts
    483 Views
    julianJ
    I wanted to provide an update to my robot-written post from the other day regarding NodeBB and the Docker Hub. On the 14th of March, we received an email from Docker which laid out in plain terms that we were on a plan that was to-be-sunset, and that all of our data was to be deleted. If you don’t upgrade to a paid subscription, Docker will retain your organization data for 30 days, after which it will be subject to deletion. During that time, you will maintain access to any images in your public repositories, though rate limitations will apply. At any point during the 30-day period, you can restore access to your organization account if you upgrade to a paid subscription. Visit our FAQ for more information. Looking into this, it does appear that the NodeBB organization is on the "Docker Free Team" plan. We've been using the Docker Hub as a means to distribute our images as it seems to be the de facto gathering point for people using Docker. There's an implicitly guarantee of quality since the NodeBB image is published by NodeBB, the organization. So, it seems like all of our historical images are getting deleted. Bummer! N.B. A developer relations representative from Docker posted later on Hacker News that this didn't mean the "images" would be deleted — but only "organization data" — since that wasn't explicitly specified in the blurb above. Did you catch that in the italicized blurb above? I sure didn't. Do you believe it? I sure don't. Is this fair? That's a rather nuanced question with many facets. I will simply point out that the Docker organization has provided their registry for free for anyone who wanted, and it was (and still is) their perogative to do so. It also means that should they withdraw that generosity, that's also within their perogative, despite how it affects the open-source community at-large. There's no onus on Docker to provide their services for free, and it is difficult for companies to find a pathway toward profitability, especially when costs escalate without a corresponding match in revenue. Isn't Docker supported by NodeBB? Not officially, no. NodeBB's stance on Docker has been passive. I like to maintain that support for the Docker image (and the Dockerfile found in our repo) is on a community-supported basis only. The reason this is is because the main developers of NodeBB (@baris and myself) don't use Docker. It would be unfair to you, the end user, to have us try to support Docker, because we would be pretty abysmal at it. We've chosen to dedicate our time and resources elsewhere, and it does mean that our Docker implementation is minimal, perhaps lackluster. The second part of this is that I personally (and I very specifically do not use the "company we" here, as this is my personal opinion) am not sold on containerization. I certainly understand the convenience benefits, and the security benefits, but I consider this an abstraction that actively harms low-level understanding of how software interacts with an operating system. For the same reason I eschew front-end frameworks from a career perspective, I am hesitant on going all-in on Docker or other related technologies for similar reasons. I will not go in-depth about this for now, but reserve the right to blather on about it at a later date I also realize that Docker is a very popular tool. The fact that it has become a household term for so many developers is a rather strong signal that containerization is The Real Deal. It is very possible that there may be a fundamental shift in the operations space away from pure ops and towards DevOps in the future that will necessitate action on our part. However, I don't think we are there right now, and I feel that this move from Docker may have set this line of thinking back for some time to come. Isn't NodeBB open-source? Can't you apply for an open-source account? Yes, and no. NodeBB is an open-source product. Our code is hosted on GitHub (thanks Microsoft!), and licensed under the GPL v3 license. At the same time, we have chosen to make this our livelihood. @baris and I have managed (with @psychobunny, for many years) to build a forum platform that can sustain our families, and allow us to spend at least part of our time on the open-source aspect of NodeBB. We offer professional consultation, theme design, custom plugins (both private and public), and a SaaS platform where you can have us host and maintain your own NodeBB, for a fee. Docker considers this a violation of their open-source qualification criteria: Not have a pathway to commercialization. Your organization must not seek to make a profit through services or by charging for higher tiers. Accepting donations to sustain your efforts is permissible. They have chosen to support the most vulnerable open-source developers, the ones who contribute and maintain open-source projects just for the benefit to the world, and that's commendable. We do not fit that narrow scope, and that's fine too. What happens now? Docker wants us to pay to use the Docker Hub, and we have decided not to for the aforementioned reasons above. Community members have already shared their thoughts with us, and are even helping us transition away from Docker Hub. We really appreciate them! We have no vested interest in Docker, and with regards to containerization of NodeBB, we will go where the prevailing winds of public opinion take us. Whether that be the GitHub Container Registry, or somewhere else. There are users whose NodeBB installs are maintained via the images on Docker Hub. We currently don't have guidance for those users, but we will in the coming days/weeks. If you are one of those users, what's important to note now is that you can no longer rely on those images being around in perpetuity. This is an issue that — as of writing — is currently still in flux. Public opinion is heated and so are the responses from Docker. References https://blog.alexellis.io/docker-is-deleting-open-source-images/ (Hacker News Discussion) https://www.docker.com/blog/we-apologize-we-did-a-terrible-job-announcing-the-end-of-docker-free-teams/ (Hacker News Discussion)
  • What should persist for docker installs?

    Unsolved Technical Support
    2
    1 Votes
    2 Posts
    430 Views
    N
    ./public/uploads/ should be persist, it's used for the uploaded files. By the way, how do you handle the persist problem in docker?
  • 4 Votes
    9 Posts
    3k Views
    Per0xP
    @ᴅᴀʀᴛʜ-ᴠᴀᴅᴇʀ It probably crashes because of the plugins you installed and nodebb can't find them (nodebb-theme-oxide in particular) I suggest you backup the redis database by copying the /data folder somewhere, then delete the contents of the original folder and also remove the config.json volume. Erase and restart redis and nodebb container (It should be like a fresh install) then installs the plugins and themes listed in the log file (nodebb-plugin-teamspeak-verify, nodebb-widget-search-bar, nodebb-theme-oxide, etc) When all plugins are installed and enabled, stop the nodebb container and restore the /data redis database with your backup, and remap config.json volume and I think it should be up. Next time you want to upgrade, disable all plugins before restarting the container with the new image.
  • 0 Votes
    5 Posts
    2k Views
    F
    Problem solved, for the record I have added all file on my GitHub: https://github.com/LM1LC3N7/Dockerfiles/blob/master/nodebb/README.md
  • 0 Votes
    5 Posts
    3k Views
    TelokisT
    @Doppy Forgot to mention you !
  • Cannot restore database

    Unsolved Technical Support
    6
    0 Votes
    6 Posts
    3k Views
    julianJ
    Unfortunately we cannot debug docker installs as that is a community contributed installation guide. Perhaps someone else here can help you out (e.g. @Ben-Lubar ?)
  • Command to restart NodeBB with Bash

    Solved Technical Support
    8
    0 Votes
    8 Posts
    5k Views
    Q
    @flex said: Do you think that it's possible to don't use yours and replace it by my reverse proxy ? HI, If you meant that one use a niginx which is installed on a host instead of a dockerized nginx which is dedicated for NodeBB, then it's totally possible, yes I just put some ideas and matters One can remove a dockerized nginx easily by just a modifying(removing) of nginx part from docker-compose.yml. Really, that's just it. ( This is a full chain, but if one doesn't need/want a full chain then.. ) One can use a dockerized nginx as a prime web server instead a host installed web server and can serve subomains or what ever with other docker or directory Actually this doesn't happen yet, but nginx can serve static files for NodeBB efficiently and you know, nginx is extremely small. So I'd rather proxy from a host installed nginx to the nodebb dedicated nginx docker ( In this case one needs to change a line 80:80 with 8080:80 or <any port>:80 in docker-compose.yml ) But, if anybody wants to get an easier way and less steps, then your idea will be also a good option.
  • NodeBB with Docker full chain ( nginx, redis, mongodb )

    Tutorials
    12
    7 Votes
    12 Posts
    12k Views
    PitaJP
    @alphagao link me whatever guide you're using. If you don't know what to do, use this guide: https://docs.nodebb.org/installing/os/ubuntu/
  • NodeBB on docker

    Technical Support
    3
    0 Votes
    3 Posts
    6k Views
    F
    @a_5mith Yes I have already checked it. I have found a docker image created by @nopz, this one is up-to-date. But the official docker image in not! Maybe you (nodebb) should give access to a dockerfile to allow anyone to build a nodebb docker image. EDIT I found the dockerfile, and the problem about this outdated version here. It's outdated because the dockerfile build the image with the v0.5.x version : FROM centos:centos7 MAINTAINER NodeBB Docker Team <[email protected]> # install main packages: RUN yum -y update ; yum clean all RUN yum -y install epel-release tar ; yum clean all RUN yum -y install wget ; yum clean all RUN yum -y groupinstall "Development Tools" RUN yum -y install nodejs git ImageMagick npm RUN yum -y install openssl openssl-devel # clone nodebb and install it RUN cd /opt ; git clone -b v0.5.x https://github.com/NodeBB/NodeBB nodebb RUN cd /opt/nodebb ; npm install # Create a nodebb volume VOLUME /opt/nodebb # Define a working directory WORKDIR /opt/nodebb # Expose ports EXPOSE 80 EXPOSE 443 EXPOSE 4567 CMD [ "node", "app.js" ] You should (NodeBB) update this dockerfile ! End of the EDIT Now, with the nopz/nodebb image I just had a problem about plugin persistence. But the first installation is so much easier and automatic with just one docker. Thanks for your answer by the way
  • 1 Votes
    8 Posts
    17k Views
    BzllB
    @Absam-Sibsam you saved me bro, worked perfectly!
  • 0 Votes
    6 Posts
    3k Views
    M
    @Xiph Thank you so much for the reply! We're not actually pulling images from Docker Hub, as the default image out there seems to just pull an 0.5 branch. We're actually building the image from source using the Dockerfile that is included. The info you included will be super helpful in getting this going the way we want. We will not be posting these images publicly, for the exact reasons you mentioned above (i.e. secret). I'll probably be back with more questions though.
  • get v0.7.X dockerfile

    General Discussion
    4
    0 Votes
    4 Posts
    3k Views
    leemyL
    Thanks a lot! It works