nginx
This commit is contained in:
+7
-7
@@ -12,14 +12,14 @@ ENV NUXT_FAIL_ON_ERROR=false
|
||||
RUN npm run generate
|
||||
|
||||
# Dockerfile untuk server Nuxt 3
|
||||
FROM node:24-alpine AS runner
|
||||
FROM nginx:alpine
|
||||
|
||||
WORKDIR /app
|
||||
# Copy konfigurasi Nginx
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
RUN npm install -g serve
|
||||
# Copy hasil build
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||
|
||||
COPY --from=builder /app/dist /app/dist
|
||||
EXPOSE 80
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["serve", "-s", "dist", "-l", "3000"]
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
|
||||
Reference in New Issue
Block a user