Files
wiki/Dockerfile
vorpax 6971fc231d feat: initialize HEC IA Wiki with Docker setup, build process, and content structure
- Add .dockerignore t
- Create Gitea Action to build and publish image
- Update Dockerfile to include build steps and health check
- Revise README.md
- Modify config.ts for site-specific settings
- Enhance content.config.ts to define collections for events, workshops, news, and technical articles
2026-01-29 11:44:34 +01:00

37 lines
1.0 KiB
Docker

# Base stage for building the static files
FROM node:lts AS base
WORKDIR /app
# Install pnpm
RUN corepack enable && corepack prepare pnpm@latest --activate
# Copy package files
COPY package.json pnpm-lock.yaml ./
# Install dependencies
RUN pnpm install --frozen-lockfile
# Copy all source files (respecting .dockerignore)
COPY . .
# Build the application
# Note: The build script includes: astro check && astro build && pagefind --site dist && cp -r dist/pagefind public/
RUN pnpm run build
# Runtime stage for serving the application
FROM nginx:mainline-alpine-slim AS runtime
# Copy the built site from dist directory
COPY --from=base /app/dist /usr/share/nginx/html
# The build script copies pagefind to public/, so we need to copy it back to dist for the runtime
# Copy pagefind if it exists in public/
COPY --from=base /app/public/pagefind /usr/share/nginx/html/pagefind
# Expose port 80
EXPOSE 80
# Add healthcheck
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost/ || exit 1