Files
siteloft/Dockerfile
Ubuntu e0e263b6bb Add Dockerfile and nginx config for Coolify deployment
Multi-stage build: Node.js 22 for Astro build, nginx:alpine for serving.
Includes gzip, security headers, and immutable cache for _astro/ assets.
2026-03-01 20:18:20 +00:00

14 lines
262 B
Docker

# Stage 1: Build
FROM node:22-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
# Stage 2: Serve
FROM nginx:alpine
COPY --from=build /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80