Files
zen-kanji/client/Dockerfile
Rene Kievits 8552b44ffd
All checks were successful
Release Build / build-docker (push) Successful in 9s
Release Build / build-android-and-release (push) Successful in 2m18s
Change prod workflow and add automatic deployment
2025-12-24 16:30:27 +01:00

32 lines
550 B
Docker

# Stage 1: Build the Application
FROM node:20-alpine AS build-stage
WORKDIR /app
ARG VITE_API_URL
ENV VITE_API_URL=$VITE_API_URL
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM node:20-alpine AS dev-stage
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
EXPOSE 5173
CMD ["npm", "run", "dev", "--", "--host"]
FROM nginx:alpine AS production-stage
RUN mkdir -p /run/nginx
COPY --from=build-stage /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]