[General] Folder Structure has been changed and Dockerfile added.

This commit is contained in:
georg-njaa
2026-04-01 06:53:10 +02:00
parent 5d1e5062e7
commit 5788da18ec
16 changed files with 48 additions and 13 deletions

23
Dockerfile Normal file
View File

@@ -0,0 +1,23 @@
# Stage 1: Build the Astro Site
FROM node:20-alpine AS builder
WORKDIR /app
# Install dependencies strictly
COPY package*.json ./
RUN npm ci
# Copy source files and build the production static files
COPY . .
RUN npm run build
# Stage 2: Serve with Nginx for lightning fast delivery and low memory footprint
FROM nginx:alpine
# Copy the generated static files from the build stage into Nginx
COPY --from=builder /app/dist /usr/share/nginx/html
# Add custom nginx config if we ever need advanced routing, otherwise default works flawlessly for SSG
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]