Files
theater-ziefen-website/Dockerfile
T
johannes.gasser c97cc4cdd2
Build and Deploy / build-and-deploy (push) Failing after 4m54s
update react
2026-05-04 21:36:00 +02:00

28 lines
834 B
Docker

# Shared build: generates /dist (Astro site + admin SPA) and tina/__generated__
FROM node:24-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci --legacy-peer-deps
COPY . .
ENV TINA_PUBLIC_IS_LOCAL=true
ENV NODE_OPTIONS="--max-old-space-size=2048"
RUN npm run build:docker
# Frontend: Nginx serving the static site + TinaCMS admin 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
EXPOSE 80
# Backend: TinaCMS self-hosted API server
FROM node:24-alpine AS backend
WORKDIR /app
COPY package*.json ./
RUN npm ci --legacy-peer-deps --omit=dev
COPY backend/ ./backend/
COPY --from=builder /app/tina/__generated__ ./tina/__generated__
ENV NODE_ENV=production
EXPOSE 3000
CMD ["node", "backend/index.js"]