refactor: simplify Dockerfile build command

This commit is contained in:
alam00000
2026-01-27 15:51:03 +05:30
parent 2c85ca74e9
commit 0c1e89f6f4
2 changed files with 3 additions and 10 deletions

View File

@@ -22,19 +22,11 @@ ENV SIMPLE_MODE=$SIMPLE_MODE
ARG COMPRESSION_MODE=all
ENV COMPRESSION_MODE=$COMPRESSION_MODE
# global arg to local arg
# global arg to local arg - BASE_URL is read from env by vite.config.ts
ARG BASE_URL
ENV BASE_URL=$BASE_URL
RUN if [ -z "$BASE_URL" ]; then \
npm run build -- --mode production && \
npm run docs:build && \
node scripts/include-docs-in-dist.js; \
else \
npm run build -- --base=${BASE_URL} --mode production && \
npm run docs:build && \
node scripts/include-docs-in-dist.js; \
fi
RUN npm run build:with-docs
# Production stage
FROM nginxinc/nginx-unprivileged:stable-alpine-slim

View File

@@ -546,6 +546,7 @@ export default defineConfig(() => {
'src/pages/font-to-outline.html'
),
'deskew-pdf': resolve(__dirname, 'src/pages/deskew-pdf.html'),
'wasm-settings': resolve(__dirname, 'src/pages/wasm-settings.html'),
},
},
},