Fix Dockerfile for Astro SSR
This commit is contained in:
13
Dockerfile
13
Dockerfile
@@ -5,7 +5,12 @@ RUN npm install
|
|||||||
COPY . .
|
COPY . .
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
FROM nginx:alpine
|
FROM node:20-alpine
|
||||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
WORKDIR /app
|
||||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
COPY --from=builder /app/dist ./dist
|
||||||
EXPOSE 80
|
COPY --from=builder /app/node_modules ./node_modules
|
||||||
|
COPY --from=builder /app/package.json ./
|
||||||
|
ENV HOST=0.0.0.0
|
||||||
|
ENV PORT=4321
|
||||||
|
EXPOSE 4321
|
||||||
|
CMD ["node", "dist/server/entry.mjs"]
|
||||||
|
|||||||
Reference in New Issue
Block a user