zkt25/sk1/frontend/Dockerfile

26 lines
461 B
Docker
Executable File

FROM node:20-alpine as build
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
FROM nginx:alpine
# Copy built files to nginx
COPY --from=build /app/dist /usr/share/nginx/html
# Copy nginx config - keep only this line, remove the duplicate below
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
# REMOVE THIS DUPLICATE LINE
# COPY nginx/default.conf /etc/nginx/conf.d/default.conf
CMD ["nginx", "-g", "daemon off;"]