diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5ae2fc9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +FROM node:24-bookworm-slim + +WORKDIR /app + +RUN npm config set registry https://registry.npmmirror.com/ && \ + yarn config set registry https://registry.npmmirror.com/ + +# Copy the repository contents into the image and install all dependencies +COPY . . + +# The container only runs the backend dev server, so strip Electron-only +# packages before installing to avoid downloading desktop binaries. +RUN node -e "const fs=require('fs');const pkg=JSON.parse(fs.readFileSync('package.json','utf8'));for(const section of ['dependencies','devDependencies']){if(!pkg[section]) continue;for(const name of ['custom-electron-titlebar','electron','electron-builder','electron-rebuild','electronmon']) delete pkg[section][name];}fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2)+'\n');" && \ + yarn install --frozen-lockfile && \ + yarn cache clean + +ENV NODE_ENV=dev +ENV PORT=10588 + +EXPOSE 10588 + +CMD ["yarn", "dev"] \ No newline at end of file diff --git a/data/web/index.html b/data/web/index.html index 73fbb89..383b9b1 100644 --- a/data/web/index.html +++ b/data/web/index.html @@ -5,37 +5,37 @@