Skip to content
  • 3 Votes
    1 Posts
    147 Views
    oplik0O

    (a development post by a contributor, not a team member 🙂 )

    NodeBB currently works with docker... technically.
    I mean, the default image is fine if you set it up correctly - but that's a pretty big if and there wasn't any good documentation. The existing docker-compose file had some tiny pain points like:

    not exposing any ports by default it recommends setting up a reverse proxy like traefik, which can be a good idea and avoids a small docker security footgun (ports exposed by containers can bypass some firewall configurations, e.g. ufw) but also means that running docker compose up just starts up a container you can't connect to by default! You'll need to modify the config, whether you want to expose a port or set up Traefik... not setting up volumes I hope you like redoing all your configuration when updating the image! also, hope you installed some plugin for storing uploads remotely, since even they'll be gone when you delete and recreate the container you can also, again, edit it to resolve that issue not creating any database in the mongodb container using admin works, but is really not intuitive!

    And when I said the image was fine, I mean that it's acceptable, not that it's great. It always builds NodeBB before startup, installing and activating plugins in a way that will persist properly requires using arcane configuration options that are not mentioned in the docs (and it results in not being able to install or remove any plugins at runtime), and - again - setting up volumes is entirely up to the user.

    However, quite some time ago, @stevefan1999-personal made a pull request that addressed many of these issues, and over time came to address almost everything I mentioned here. And finally we're getting close to landing these changes, and some other small improvements, in NodeBB/NodeBB#12031

    So what will change?

    Running docker compose --profile mongo up is now all you need to start a working instance of NodeBB in a container. Initially it'll launch the web installer, with already populated database configuration, leaving you just to set up the NodeBB URL and admin account. Then just waiting a bit for setup to finish and you're done - NodeBB is running under port 4567. You can now use some reverse proxy on host, modify the compose file to expose it under port 80 or add a containerized reverse proxy and remove the default port binding. If you use the default compose file you'll notice that configuration and - more importantly - uploads are now mounted in .docker directory, so they'll persist when recreating the container There are some additional env variables that can affect the image startup behavior - e.g. you can now choose if NodeBB will run a build before starting.

    There's another nice change that you might've thought of if you saw the initial PR title - docker image size. And it's a fairly large difference. Some numbers:

    current image: 601MiB compressed/1.62GiB uncompressed original alpine PR: 315MiB compressed/986MiB uncompressed new PR (slim debian build): 211MiB compressed/674MiB uncompressed

    For reference, now the official MongoDB image is actually larger than NodeBB, and combined (even with redis added to the mix) they're still e.g. almost 2x smaller than Discourse slim image (747MiB compressed/2.02GiB uncompressed).
    And MongoDB is the largest of the supported databases - Postgres clocks at only 150MiB compressed and offers a 94MiB compressed alpine version, and Redis clocks in at 49MiB compressed for a debian image and just 15MiB for alpine.

    The result is that when running NodeBB with postgres the images will end up taking less than 1GB of disk space, basically half of what they do currently. All while offering much better user experience and configurability.

    And finally, Docker is graduating to being mentioned in official docs with NodeBB/docs#78 🙂

  • 8 Votes
    7 Posts
    3k Views
    julianJ

    @phenomlab very true. A lot of talented people have done some surprisingly cool things with just the custom css panel.

  • 4 Votes
    2 Posts
    271 Views
    julianJ

    I missed one from last night!

    @baris added a tag filter UI to the tags page 😄

    Link Preview Image Tag filter on topic list

    Harmony has a tag filter on category, recent and unread pages now. This has been requested a few times on our github and on this forum and it was possible by...

    favicon

    NodeBB Community (community.nodebb.org)

  • 2 Votes
    1 Posts
    157 Views
    julianJ

    The updates continue unabated here, as we work on updating the Harmony theme, page by page!

    This past couple weeks, you might've noticed that the /users page got a refresh:

    Screenshot 2023-02-10 at 15-24-08 Community.png

    Almost all of the elements have remained unchanged. There is no new information here, but it's absolutely shocking to see how much more balanced the page is compared to Persona.

    We also updated the flag list and details pages, to give those tireless content moderators a bit of a boost as well. You might notice that the list of flag filters in the sidebar has been updated to match the UI controls found in the /search page as well.

    Screenshot 2023-02-10 at 15-21-31 NodeBB.png

    Screenshot 2023-02-10 at 15-21-26 NodeBB.png

    Here is how it used to look on Persona:

    Screenshot 2023-02-10 at 15-19-18 NodeBB.png

    Screenshot 2023-02-10 at 15-19-24 NodeBB.png

  • 0 Votes
    28 Posts
    8k Views
    KalbaskinK

    Had the same problem. Many thanks for the solution!

  • 0 Votes
    6 Posts
    3k Views
    O

    😞

    tom@ama:~/nodebb$ mongo nodebb
    MongoDB shell version: 3.2.12
    connecting to: nodebb
    Server has startup warnings:
    2017-02-19T11:42:57.746+0000 I CONTROL [initandlisten]
    2017-02-19T11:42:57.746+0000 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
    2017-02-19T11:42:57.746+0000 I CONTROL [initandlisten] ** We suggest setting it to 'never'
    2017-02-19T11:42:57.746+0000 I CONTROL [initandlisten]
    2017-02-19T11:42:57.746+0000 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
    2017-02-19T11:42:57.746+0000 I CONTROL [initandlisten] ** We suggest setting it to 'never'
    2017-02-19T11:42:57.746+0000 I CONTROL [initandlisten]

    show users
    {
    "_id" : "nodebb.nodebbsvc",
    "user" : "nodebbsvc",
    "db" : "nodebb",
    "roles" : [
    {
    "role" : "readWrite",
    "db" : "nodebb"
    }
    ]
    }

  • 0 Votes
    5 Posts
    3k Views
    SergioNGS

    @baris well finally managed to get it working, I was missing to accept merging the branch when doing the pull.... but that was not enough as now it was showing me a problem with the widget essentials... so I checkout the commit for "up widget essentials" and that fixed it for me!!

    Thank you for your time @baris 😀 👍

  • 0 Votes
    3 Posts
    5k 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 🙂

  • 0 Votes
    2 Posts
    2k Views
    P

    We do offsite installations and upgrades, message [email protected]

    Of course, we do have docs so you should try it yourself just back up everything first!

    Edit: to answer your original question, we do plan on building an upgrade button into our hosting plans control panel - right now we just upgrade customers manually. It's probably impossible (or hard) to make an app upgrade itself via acp, we would need to make the acp a standalone application (we've toyed around the idea, but not worth the development time)

  • 1 Votes
    5 Posts
    2k Views
    NodeMonsterN

    I have successfully patched font awesome to 5.6.3. Both free or pro should work fine. As a total newbie to nodebb, there might be issues that I am not aware yet. Below is a simple script to assist any future updates.

    I have not fully tested the procedures. Proceed at your own risk! 🌶

    #!/bin/bash ######################################################################################################### ## copy latest font awesome's /webfonts/* to public/vendor/fontawesome/fonts ## ## copy latest font awesome's /less/_variables.less to public/vendor/fontawesome/less/variables.less ## ## copy latest font awesome's /less/_icons.less to public/vendor/fontawesome/less/icons.less ## ######################################################################################################### latestfa=`curl -s https://github.com/FortAwesome/Font-Awesome/releases | grep "tree" | head -1 | grep -o -P '(?<=title=).*(?=>)'` if ! grep $latestfa public/vendor/fontawesome/less/variables.less; then echo "Latest Font Awesome not copied yet!" exit 0; fi #Use back nodebb preferred font sizes sed -i 's#../webfonts#./vendor/fontawesome/fonts#; s/16px/14px/; s#2em#(30em / 14)#' public/vendor/fontawesome/less/variables.less #css for latest FA fonts cat <<EOF > public/vendor/fontawesome/less/path.less @font-face { font-family: 'FontAwesome'; font-style: normal; font-weight: 400; src: url("@{fa-font-path}/fa-brands-400.eot"); src: url("@{fa-font-path}/fa-brands-400.eot?#iefix") format("embedded-opentype"), url("@{fa-font-path}/fa-brands-400.woff2") format("woff2"), url("@{fa-font-path}/fa-brands-400.woff") format("woff"), url("@{fa-font-path}/fa-brands-400.ttf") format("truetype"), url("@{fa-font-path}/fa-brands-400.svg#fontawesome") format("svg"); } @font-face { font-family: 'FontAwesome'; font-style: normal; font-weight: 400; src: url("@{fa-font-path}/fa-regular-400.eot"); src: url("@{fa-font-path}/fa-regular-400.eot?#iefix") format("embedded-opentype"), url("@{fa-font-path}/fa-regular-400.woff2") format("woff2"), url("@{fa-font-path}/fa-regular-400.woff") format("woff"), url("@{fa-font-path}/fa-regular-400.ttf") format("truetype"), url("@{fa-font-path}/fa-regular-400.svg#fontawesome") format("svg"); } EOF #Delete the old font links sed -i '/fa fa-/d; ' src/views/partials/fontawesome.tpl #Get new icons into variable newfontawesome=`grep -o -P '(?<=fa-var-).*(?=:)' public/vendor/fontawesome/less/variables.less` #Make icon Links for i in $newfontawesome; do echo "Insert $i Into Template" echo "<i class=\"fa fa-$i\"></i>" >>/tmp/newfontawesome.txt done #Insert icons into template sed -i '/fa-icons/r /tmp/newfontawesome.txt' src/views/partials/fontawesome.tpl #insert the new font links #Fix notification bell grep -rl fa-bell-o | xargs sed -i 's/fa-bell-o/fa-bells/g' grep -rl fa-bell-slash-o | xargs sed -i 's/fa-bell-slash-o/fa-bell-slash/g' #Fix chats comment grep -rl fa-comment-o | xargs sed -i 's/fa-comment-o/fa-comments/g' #Fix setting gear grep -rl fa-gear | xargs sed -i 's/fa-gear/fa-cogs/g' #Fix clock grep -rl fa-clock-o | xargs sed -i 's/fa-clock-o/fa-clock/g' #Fix group grep -rl fa-group | xargs sed -i 's/fa-group/fa-users/g' #Fix floppy saving button grep -rl fa-floppy-o | xargs sed -i 's/fa-floppy-o/fa-save/g' #Fix Thumbs UP Down grep -rl fa-thumbs-o | xargs sed -i 's/fa-thumbs-o/fa-thumbs/g' #Fix Bookmark grep -rl fa-heart-o | xargs sed -i 's/fa-heart-o/fa-book-heart/g' #Fix ThumbTack grep -rl fa-thumb-tack | xargs sed -i 's/fa-thumb-tack/fa-thumbtack/g' #Fix Fork Topic grep -rl fa-code-fork | xargs sed -i 's/fa-code-fork/fa-handshake/g' #Fix Trash grep -rl fa-trash-o | xargs sed -i 's/fa-trash-o/fa-trash-alt/g' #Fix Rebuild grep -rl fa-refresh | xargs sed -i 's/fa-refresh/fa-sync/g' #Fix Mail Forward grep -rl fa-mail-forward | xargs sed -i 's/fa-mail-forward/fa-mail/g' #Fix Picture in Editor grep -rl fa-picture-o | xargs sed -i 's/fa-picture-o/fa-image/g' #Fix Emoji in Editor grep -rl fa-smile-o | xargs sed -i 's/fa-smile-o/fa-smile-wink/g' #Fix Rotate Left Right grep -rl fa-rotate-left | xargs sed -i 's/fa-rotate-left/fa-undo/g' grep -rl fa-rotate-right | xargs sed -i 's/fa-rotate-right/fa-redo/g' ./nodebb upgrade ./nodebb restart #Some icons like fa-clock-o in /recent and fa-group in /group have been renamed and are not compatible with the latest FA5. In order to change them, inspect the element in your browser, under iconPicker class abd change fa-clock-o or fa-group to fa-500px or something else that you can click on and change it.
  • 1 Votes
    2 Posts
    2k Views
    ShardS

    @ arasbm:

    There's some work being done to dockerize the install. If that doesn't do the trick for you, I expect some of the same automation will.

    Link Preview Image NodeBB CentOS Dockerfile

    Typical scaling of NodeBB is multiple processes managed as a cluster by loader.js. Node.js manages its own internal thread pool, so we don't touch threads. H...

    favicon

    NodeBB Community (community.nodebb.org)

  • 1 Votes
    37 Posts
    16k Views
    S

    We found a few bugs popping up with the update. Will post them in a second.

  • 0 Votes
    3 Posts
    2k Views
    KotoWolodK

    @julian ok, thx

  • 0 Votes
    7 Posts
    3k Views
    barisB

    @a_5mith if you are quoting from a different topic it puts in a link to that topic but it was using the old format which is fixed now. https://github.com/NodeBB/NodeBB/issues/1840

  • 1 Votes
    12 Posts
    4k Views
    barisB

    @frissdiegurke either that or text complete can be a standalone plugin that other plugins can add stuff into.