feat(website): add Dockerfile for Astro site

This commit is contained in:
Nathan Flurry 2026-01-27 14:34:37 -08:00
parent d5b5efebb6
commit 32c0c71a79

26
website/Dockerfile Normal file
View file

@ -0,0 +1,26 @@
FROM node:22-alpine AS build
WORKDIR /app
RUN npm install -g pnpm
# Copy package files
COPY package.json pnpm-lock.yaml* ./
# Install dependencies
RUN pnpm install --frozen-lockfile || pnpm install
# Copy source
COPY . .
# Build
RUN pnpm build
FROM caddy:alpine
COPY --from=build /app/dist /srv
RUN cat > /etc/caddy/Caddyfile <<'EOF'
:80 {
root * /srv
file_server
try_files {path} /index.html
}
EOF
EXPOSE 80