commit e64c5272cc0ba31dfa17fdab288579671ebf2e48 Author: holzi1005 Date: Wed Apr 9 21:00:10 2025 +0200 Add Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..020c45a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,27 @@ +ARG VERSION=1.21.2 +FROM node:23-alpine + +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}.tar.gz -O artifact.tar.gz \ + && 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 + +CMD ["node", "server/server.js"] \ No newline at end of file