Adds a self-service editor at admin.larpaso.de so texts, images, links, Impressum/Datenschutz, fonts, font sizes and colors can be changed without a developer. All homepage/legal content moves into content/site.json and a new content/theme.json drives every CSS color/font/size token; the Astro pages read from these at build time. The admin/ service (Node/Express) provides bcrypt+session login with rate limiting, a schema-driven form UI (including a hex/RGB/alpha color picker), image upload, and a publish action that runs the Astro build and republishes into a volume shared with the nginx website container - so edits go live without redeploying that container. See DEPLOYMENT_ADMIN.md for the server-side setup steps.
19 lines
701 B
Docker
19 lines
701 B
Docker
# --- Build-Stage ---
|
|
FROM node:22-alpine AS build
|
|
WORKDIR /app
|
|
COPY package*.json ./
|
|
RUN npm ci
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
# --- Serve-Stage ---
|
|
FROM nginx:alpine
|
|
# Baked-in default build. /usr/share/nginx/html itself is normally a shared
|
|
# volume (see DEPLOYMENT_ADMIN.md) so the admin editor can publish new builds
|
|
# without redeploying this container; docker-entrypoint.d seeds it from here
|
|
# on first start so the site isn't empty before anyone publishes.
|
|
COPY --from=build /app/dist /usr/share/nginx/html-default
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
COPY docker-entrypoint-seed.sh /docker-entrypoint.d/50-seed-content.sh
|
|
RUN chmod +x /docker-entrypoint.d/50-seed-content.sh
|
|
EXPOSE 80
|