Files
digicraft-fe/Dockerfile
Fahri Can Seçer eb65cbc44f
All checks were successful
Deploy Frontend / deploy (push) Successful in 1m56s
Update Dockerfile
2026-02-05 01:42:14 +03:00

31 lines
653 B
Docker

# Build stage
FROM node:20 AS build-stage
WORKDIR /app
COPY package*.json ./
RUN npm install --legacy-peer-deps
COPY . .
# Set build-time variables for Vite
ARG VITE_API_URL
ARG VITE_GOOGLE_CLIENT_ID
ENV VITE_API_URL=$VITE_API_URL
ENV VITE_GOOGLE_CLIENT_ID=$VITE_GOOGLE_CLIENT_ID
RUN npm run build
# Production stage
FROM nginx:stable-alpine AS production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html
# Default nginx config is usually enough for simple SPAs
# But we might need a custom config for client-side routing
# For now, keeping it basic as per standard Vite/Nginx pattern
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]