Files
lti-web-client/Dockerfile
T
GitLab Deploy Bot d3cc38aed5 edit Dockerfile
2025-11-09 15:15:26 +07:00

25 lines
655 B
Docker

FROM node:20-alpine
RUN apk add --no-cache git bash build-base curl
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
# Buat config agar Next tahu output: export
RUN echo "const config = { output: 'export', images: { unoptimized: true } }; export default config;" > next.config.mjs
# Build project (Next.js 15 otomatis static export)
RUN NEXT_DISABLE_TURBOPACK=1 npx next build
# Pastikan folder static tersedia untuk URL _next/static
RUN mkdir -p .next/server/app/_next && \
cp -r .next/static .next/server/app/_next/static && \
RUN cp -r public/* .next/server/app/
EXPOSE 3000
CMD ["npx", "serve", ".next/server/app", "-l", "3000"]