video-flow-toon/Dockerfile
zyc 16652ffdb0
Some checks failed
Build and Deploy / build-and-deploy (push) Has been cancelled
Add Gitea CI and Kubernetes deployment
2026-05-27 10:19:36 +08:00

33 lines
1.2 KiB
Docker

FROM node:24-bookworm-slim
WORKDIR /app
RUN apt-get update && \
apt-get install -y --no-install-recommends ca-certificates python3 make g++ && \
rm -rf /var/lib/apt/lists/* && \
npm config set registry https://registry.npmmirror.com/ && \
yarn config set registry https://registry.npmmirror.com/
COPY package.json yarn.lock ./
# The container runs the web/API service only, so strip Electron-only packages
# before installing to avoid downloading desktop binaries in CI.
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
COPY . .
RUN yarn build && \
mkdir -p /opt/toonflow-data && \
cp -a data/. /opt/toonflow-data/ && \
chmod +x scripts/docker-entrypoint.sh
ENV NODE_ENV=prod
ENV PORT=10588
EXPOSE 10588
ENTRYPOINT ["scripts/docker-entrypoint.sh"]
CMD ["node", "data/serve/app.js"]