Any experience on deployment automation?

Technical Support
  • At coderdojo, we're using nodebb for forums, and a fork of cd-persona which is changing from time to time.
    We'd like to know if anybody had any experience in automation of deployment of themes/plugins, our main issue being that we need an automatic reload of the forum. Being circleCi + aws based for our dev pipeline, and AWS codedeploy not supporting a custom bash post-deployment, we're slightly stuck for the automation.
    Do you know of any plugin that would be a "theme/plugin-watcher"? Elsewhat I'd take any input/ideas/experience πŸ™‚

  • I think you can use NPM for this. You can simply run "npm update" every time before starting the server. The positive thing about this, is that other packages can also be updated.

    If you host the theme at a (private) GIT repository or as tarball over HTTP, you can include the URL to these resources as dependency. An additional benefit of using GIT is that you can also merge changes to the persona team to your theme, which may make updates faster. How you can specify URLs to GIT repositories or tarballs is shown at this page.

  • Great idea, didn't think of npm update, thanks πŸ™‚


Suggested Topics


  • 0 Votes
    1 Posts
    48 Views

    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 πŸ™

  • How can I deploy on heroku ?

    Unsolved Technical Support
    0 Votes
    2 Posts
    270 Views

    I see guide to deploy on heroku https://docs.nodebb.org/installing/cloud/heroku. But mLab’s Heroku Add-on was shutdown on November 10, 2020. So I tried to deploy it on heroku but I can not. Can give me guide to deploy it on heroku by free plan ?

    Thanks for reading. Please advise.

  • 0 Votes
    1 Posts
    168 Views

    So.... I followed the instructions using this:
    https://docs.nodebb.org/installing/cloud/heroku/
    and everything seemed to go smoothly, I started the app using Heroku, and the first page I get is:
    579d24db-0f66-43a0-87f4-ccc120675e25-image.png
    instead of the usual homepage, and it keeps telling me this message:
    238f50e5-e4b5-440e-a06e-07157b39dc58-image.png .

    I tried reading through others who had similar issues but failed to find what is wrong with my setup, and not really sure where to start looking as i am new to this. I'd appreciate any help i can get πŸ™‚ thanks for your time

  • 0 Votes
    7 Posts
    332 Views

    @PitaJ figured it out, I need to run nodes build

  • 0 Votes
    2 Posts
    539 Views

    Are you running this on your local machine? Do you have build-essentials installed?