Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
f712bc7
#SB-I403: fix: docker build and test
jeraldfernandes28 Dec 23, 2025
8f0e474
#SB-I403: fix: build file workflow fix
jeraldfernandes28 Dec 23, 2025
7d2fa80
#SB-I403: fix: nodebb clone fix
jeraldfernandes28 Dec 23, 2025
6a5753b
#SB-I403: fix: dependency missing issue fix
jeraldfernandes28 Dec 23, 2025
f0df615
#SB-I403: fix: installation fix
jeraldfernandes28 Dec 23, 2025
17bdbc9
#0000 changes
jeraldfernandes28 Dec 30, 2025
3e1e6ac
#SB-I403: fix: removal of deprecated write plugin
jeraldfernandes28 Dec 30, 2025
8a07dd9
#SB-I403: fix: point the create forum plugin branch
jeraldfernandes28 Dec 31, 2025
0616d8b
#0000: test the reverted old version
jeraldfernandes28 Dec 31, 2025
1276edc
#SB-I403: fix: Use local sunbird api plugin
jeraldfernandes28 Jan 2, 2026
66783c5
#SB-I403: fix: added the write api plugin support
jeraldfernandes28 Jan 2, 2026
cc98ea9
fix: Add NodeBB build step to generate service worker and build artif…
jeraldfernandes28 Jan 5, 2026
7832b12
fix: Improve NodeBB build process to generate UI templates and assets
jeraldfernandes28 Jan 5, 2026
5f5fdd5
#SB-I403: fix: workflow fix
jeraldfernandes28 Jan 6, 2026
7742d65
#SB-I403: fix: Plugin version update
jeraldfernandes28 Jan 6, 2026
0de7146
#SB-I403: fix: updated docker file
jeraldfernandes28 Jan 6, 2026
d5c4074
#SB-I403: fix: fix in docker file
jeraldfernandes28 Jan 6, 2026
86c48d5
#SB-I403: fix: eliminate build in workflow
jeraldfernandes28 Jan 6, 2026
62d5d55
#SB-I403: fix: changes in workflow
jeraldfernandes28 Jan 8, 2026
403fd48
#SB-I403: fix: changes in docker file
jeraldfernandes28 Jan 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/workflows/build-nodebb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Build and Publish Docker Image

on:
push:
tags:
- "*"

env:
NODEBB_VERSION: 'v4.7.2'

jobs:
build-and-push:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
token: ${{ secrets.GITHUB_TOKEN }}

- name: Clone NodeBB repository
run: |
git clone --depth=1 https://github.com/NodeBB/NodeBB.git -b ${{ env.NODEBB_VERSION }} NodeBB || true

- name: Copy build files to NodeBB directory
run: |
cp Dockerfile NodeBB/ || true
cp build.sh NodeBB/ || true
chmod +x NodeBB/build.sh || true

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Get short commit hash
id: vars
run: echo "commit_hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

- name: Prepare Docker image name and tag
run: |
REPO_NAME_LOWERCASE=$(echo "${GITHUB_REPOSITORY}" | tr '[:upper:]' '[:lower:]')
TAG_NAME=$(echo "${GITHUB_REF_NAME}" | tr '[:upper:]' '[:lower:]')
BUILD_TAG="${TAG_NAME}-${{ steps.vars.outputs.commit_hash }}-${GITHUB_RUN_NUMBER}"

echo "IMAGE_NAME=ghcr.io/${REPO_NAME_LOWERCASE}" >> $GITHUB_ENV
echo "IMAGE_TAG=${BUILD_TAG}" >> $GITHUB_ENV

echo "Generated Image Name: ${IMAGE_NAME}"
echo "Generated Image Tag: ${IMAGE_TAG}"

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: ./NodeBB
file: ./NodeBB/Dockerfile
push: true
labels: commitHash=${{ steps.vars.outputs.commit_hash }}
tags: ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
14 changes: 6 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,17 @@ RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

ARG NODE_ENV
ENV NODE_ENV $NODE_ENV
ENV NODE_ENV=$NODE_ENV

COPY NodeBB/install/package.json /usr/src/app/package.json
COPY NodeBB/ /usr/src/app
RUN npm install --only=prod && \
npm cache clean --force


RUN npm install https://github.com/Sunbird-Lern/nodebb-plugin-sunbird-oidc.git#master
RUN npm install https://github.com/Sunbird-Lern/nodebb-plugin-sunbird-api.git#release-4.6.0
RUN npm install https://github.com/Sunbird-Lern/nodebb-plugin-sunbird-telemetry.git#master
RUN npm install https://github.com/Sunbird-Lern/nodebb-plugin-azure-storage.git#main
RUN npm install https://github.com/NodeBB/nodebb-plugin-write-api.git#master
RUN npm install https://github.com/Sunbird-Lern/nodebb-plugin-sunbird-oidc.git#develop
RUN npm install https://github.com/Sunbird-Lern/nodebb-plugin-sunbird-api.git#develop
RUN npm install https://github.com/Sunbird-Lern/nodebb-plugin-sunbird-telemetry.git#develop
RUN npm install https://github.com/Sunbird-Lern/nodebb-plugin-azure-storage.git#develop

# Nodebb was not taking the latest version of mentions plugin, That's why we added install command here.
RUN npm install https://github.com/julianlam/nodebb-plugin-mentions.git#master
Expand All @@ -40,4 +38,4 @@ EXPOSE 4567
# ENV admin__password="nodebbAdminPassword00"
########################################################

CMD node ./nodebb setup ; node ./nodebb start
CMD ["node", "./nodebb", "start"]