Nginx image built locally for amd64 and loaded via docker save/load, compose on the a75 network behind Nginx Proxy Manager (port 3000). Live on officinezuliani.a75.eu with noindex on non-production hosts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
19 lines
574 B
Docker
19 lines
574 B
Docker
# syntax=docker/dockerfile:1
|
|
|
|
# Sito statico Astro servito da nginx (ADR 0003, deploy come cam85: ADR 0004).
|
|
# Stage 1: build con Node; stage 2: solo i file di dist/ dentro nginx.
|
|
|
|
FROM node:22-alpine AS build
|
|
WORKDIR /app
|
|
COPY package.json package-lock.json ./
|
|
RUN --mount=type=cache,target=/root/.npm npm ci --no-audit --no-fund
|
|
COPY astro.config.mjs tsconfig.json ./
|
|
COPY public ./public
|
|
COPY src ./src
|
|
RUN npm run build
|
|
|
|
FROM nginx:1.27-alpine AS runner
|
|
COPY docker/nginx.conf /etc/nginx/conf.d/default.conf
|
|
COPY --from=build /app/dist /usr/share/nginx/html
|
|
EXPOSE 3000
|