Files
My-KOPKB/fe/docker/Dockerfile
T
ismailmasseran 507072c5ab
Build Docker Image / build-backend (push) Failing after 7s
Build Docker Image / build-frontend (push) Failing after 6s
DONE: add cicd pipeline separate fe and be, test first on gitea (#1)
Co-authored-by: ISMAIL MASSERAN <topaz@ISMAILs-Macbook.local>
Reviewed-on: #1
2026-06-30 11:01:09 +08:00

18 lines
574 B
Docker

# Stage 1: Build Vue SPA
FROM node:22 AS builder
WORKDIR /app
COPY fe/package*.json fe/pnpm-lock.yaml ./
RUN npm install -g pnpm && pnpm install --frozen-lockfile
COPY fe/ ./
ARG VITE_API_BASE_URL=https://api.koppkb.com
ARG VITE_APP_URL=https://anggota.koppkb.com
ENV VITE_API_BASE_URL=$VITE_API_BASE_URL
ENV VITE_APP_URL=$VITE_APP_URL
RUN pnpm run typecheck && pnpm exec vite build --mode=production
# Stage 2: Serve static files
FROM nginx:1.27-alpine
COPY fe/docker/nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=builder /app/dist /usr/share/nginx/html
EXPOSE 80