From bb178034a0899a8a2b730147c21c3f3e2a0de73c Mon Sep 17 00:00:00 2001 From: holzi1005 Date: Sat, 23 Nov 2024 18:59:34 +0100 Subject: [PATCH 1/4] add whitebophir dockerimage --- whitebophir_application_dockerfile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 whitebophir_application_dockerfile diff --git a/whitebophir_application_dockerfile b/whitebophir_application_dockerfile new file mode 100644 index 0000000..7b93b22 --- /dev/null +++ b/whitebophir_application_dockerfile @@ -0,0 +1,26 @@ +ARG NODE_IMAGE_VERSION=23-alpine +FROM node:${NODE_IMAGE_VERSION} + +ARG VERSION + +WORKDIR /opt/app + +RUN chown -R node:node /opt/app + +# Allow node to bind to port 80 +RUN apk update && apk add libcap + +USER node + +RUN wget https://github.com/lovasoa/whitebophir/archive/refs/tags/v${VERSION}.zip -O artifact.zip \ + && unzip artifact.zip \ + && mv whitebophir-${VERSION}/* . + && rm artifact.zip + +RUN npm ci --production + +EXPOSE 3000 + +VOLUME /opt/app/server-data + +CMD ["node", "server/server.js"] -- 2.39.5 From a0ba377e6d74239d6dcddf2382fc984b3eff1ab8 Mon Sep 17 00:00:00 2001 From: holzi1005 Date: Sat, 23 Nov 2024 19:00:07 +0100 Subject: [PATCH 2/4] remove volume --- whitebophir_application_dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/whitebophir_application_dockerfile b/whitebophir_application_dockerfile index 7b93b22..7439fd6 100644 --- a/whitebophir_application_dockerfile +++ b/whitebophir_application_dockerfile @@ -21,6 +21,4 @@ RUN npm ci --production EXPOSE 3000 -VOLUME /opt/app/server-data - CMD ["node", "server/server.js"] -- 2.39.5 From 128a9d0365335b1e0e175d74f48b0e6c6fdb510f Mon Sep 17 00:00:00 2001 From: holzi1005 Date: Sat, 23 Nov 2024 19:11:30 +0100 Subject: [PATCH 3/4] use tar and strip first folders --- whitebophir_application_dockerfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/whitebophir_application_dockerfile b/whitebophir_application_dockerfile index 7439fd6..c3d07e7 100644 --- a/whitebophir_application_dockerfile +++ b/whitebophir_application_dockerfile @@ -12,10 +12,9 @@ RUN apk update && apk add libcap USER node -RUN wget https://github.com/lovasoa/whitebophir/archive/refs/tags/v${VERSION}.zip -O artifact.zip \ - && unzip artifact.zip \ - && mv whitebophir-${VERSION}/* . - && rm artifact.zip +RUN wget https://github.com/lovasoa/whitebophir/archive/refs/tags/v${VERSION}.tar.gz -O artifact.tar.gz \ + && tar --strip-components=1 -xvzf artifact.tar.gz \ + && rm artifact.tar.gz RUN npm ci --production -- 2.39.5 From 6d190b1cefff3f35b43eff223931e469e662162c Mon Sep 17 00:00:00 2001 From: holzi1005 Date: Sun, 24 Nov 2024 08:41:02 +0100 Subject: [PATCH 4/4] add material Whiteoard --- whitebophir_application_dockerfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/whitebophir_application_dockerfile b/whitebophir_application_dockerfile index c3d07e7..b7d6d0a 100644 --- a/whitebophir_application_dockerfile +++ b/whitebophir_application_dockerfile @@ -16,6 +16,12 @@ RUN wget https://github.com/lovasoa/whitebophir/archive/refs/tags/v${VERSION}.ta && tar --strip-components=1 -xvzf artifact.tar.gz \ && rm artifact.tar.gz +RUN wget https://github.com/H2-invent/materialWhitebophir/archive/master.tar.gz -O artifact.tar.gz \ + && tar --strip-components=1 -xvzf artifact.tar.gz \ + && mv fonts client-data/fonts/ \ + && mv css/board.css client-data/board.css \ + && rm artifact.tar.gz + RUN npm ci --production EXPOSE 3000 -- 2.39.5