diff --git a/deploy/docker/Dockerfile b/deploy/docker/Dockerfile index 64bcf4f..5d0b3ab 100644 --- a/deploy/docker/Dockerfile +++ b/deploy/docker/Dockerfile @@ -13,16 +13,19 @@ RUN npm install COPY . . # Build the project -RUN npm run build +RUN npm run start -# Use Nginx for serving static files -FROM nginx:alpine +# Final stage +FROM node:18-alpine -# Copy build files to Nginx html directory -COPY --from=builder /app/dist /usr/share/nginx/html +# Set working directory +WORKDIR /app -# Expose port 80 -EXPOSE 80 +# Copy built files from builder +COPY --from=builder /app ./ -# Start Nginx -CMD ["nginx", "-g", "daemon off;"] +# Expose the application port (sesuaikan dengan port yang digunakan di package.json) +EXPOSE 4173 + +# Jalankan aplikasi dengan npm run preview +CMD ["npm", "run", "preview"]