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.
This commit is contained in:
Ubuntu
2026-03-01 20:18:20 +00:00
parent 9cfd926e9c
commit e0e263b6bb
3 changed files with 87 additions and 0 deletions

13
Dockerfile Normal file
View File

@@ -0,0 +1,13 @@
# 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