add ssr
Build and Deploy / build-and-deploy (push) Failing after 36s

This commit is contained in:
2026-05-18 10:34:38 +02:00
parent 57af0b8386
commit fb5aa07373
7 changed files with 7282 additions and 188 deletions
+8 -6
View File
@@ -1,4 +1,4 @@
# Build: generates /dist (Astro static site + Sanity Studio SPA)
# Build: generates /dist (Astro SSR build + Sanity Studio SPA)
FROM node:22-alpine AS builder
WORKDIR /app
COPY package*.json ./
@@ -6,9 +6,11 @@ RUN npm ci
COPY . .
RUN npm run build
# Frontend: Nginx serving the static site + Sanity Studio SPA
FROM nginx:alpine AS frontend
RUN rm /etc/nginx/conf.d/default.conf
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=builder /app/dist /usr/share/nginx/html
# Server: Node.js running the Astro SSR server
FROM node:22-alpine
WORKDIR /app
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/dist ./dist
ENV PORT=80
EXPOSE 80
CMD ["node", "./dist/server/entry.mjs"]