FROM caddy:2.7-alpine # Install dependencies RUN apk add --no-cache nodejs npm bash # Set working directory WORKDIR /srv # Copy website files COPY . /srv # Install npm dependencies for PDF generation RUN cd /srv && npm install --production # Run all update scripts (sitemap, navigation, stories, CSP hashes, accessibility fixes) RUN cd /srv && \ chmod +x update-all.sh && \ ./update-all.sh # Generate PDFs for all pages RUN cd /srv && npm run generate-pdfs # Expose port EXPOSE 8080 # Start Caddy with the local Caddyfile CMD ["caddy", "run", "--config", "/srv/Caddyfile.local"]