mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
25 lines
655 B
Docker
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"] |