diff --git a/20260501-HomeLab/FLUG_Presentation_Slides.pdf b/20260501-HomeLab/FLUG_Presentation_Slides.pdf new file mode 100644 index 0000000..de911e3 Binary files /dev/null and b/20260501-HomeLab/FLUG_Presentation_Slides.pdf differ diff --git a/20260501-HomeLab/index.html b/20260501-HomeLab/index.html new file mode 100644 index 0000000..0045121 --- /dev/null +++ b/20260501-HomeLab/index.html @@ -0,0 +1,92 @@ + + + + + + HomeLab Presentation - 2026-05-01 + + + +
+

HomeLab Presentation

+

May 1, 2026

+
+ +
+ +
+ +
+ Open PDF in New Tab + Download PDF +
+ + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5be68c7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,27 @@ +FROM node:22-alpine AS builder + +# Set working directory +WORKDIR /app + +# Copy the book source files +COPY . /app/flug + +# Set the working directory to the book folder +WORKDIR /app/flug + +# Install honkit globally and build the book +RUN npm install -g vite && \ + npm install && \ + vite build + +# Final Stage: Serve with Nginx +FROM nginx:alpine + +# Copy the rendered HTML from the builder stage +COPY --from=builder /app/flug/dist /usr/share/nginx/html + +# Expose port 80 +EXPOSE 80 + +# Use the default Nginx configuration to serve static files +CMD ["nginx", "-g", "daemon off;"] diff --git a/README.md b/README.md index 16eeb35..14e1c6b 100644 --- a/README.md +++ b/README.md @@ -2,18 +2,22 @@ This repository contains the FLUG presentations. -## Usage - -Install the required dependencies: +## Serving localls +Run once to install Vite globally: ```bash -nvm use stable -npm install npm install -g vite +npm install ``` Run the development server: - ```bash -vite +vite serve +``` + +## Building docker image + +To build the Docker image, run: +```bash +docker buildx build --platform linux/arm64 --push -t docker.tipsy.codes/flug:20260519 . ``` diff --git a/index.html b/index.html index 42fe8bb..9e82c97 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,4 @@ - + @@ -63,6 +63,10 @@ Hello Linux
April 3, 2026
+
  • + Home Lab +
    May 1, 2026
    +
  • diff --git a/vite.config.js b/vite.config.js index 0da4cf2..21a92cb 100644 --- a/vite.config.js +++ b/vite.config.js @@ -27,6 +27,37 @@ function getInputs() { } export default defineConfig({ + plugins: [ + { + name: "copy-pdfs", + writeBundle() { + const entries = fs.readdirSync(__dirname, { withFileTypes: true }); + for (const entry of entries) { + if ( + entry.isDirectory() && + entry.name !== "node_modules" && + entry.name !== "dist" && + !entry.name.startsWith(".") + ) { + const dirPath = resolve(__dirname, entry.name); + const files = fs.readdirSync(dirPath); + for (const file of files) { + if (file.toLowerCase().endsWith(".pdf")) { + const src = resolve(dirPath, file); + const destDir = resolve(__dirname, "dist", entry.name); + const dest = resolve(destDir, file); + + if (!fs.existsSync(destDir)) { + fs.mkdirSync(destDir, { recursive: true }); + } + fs.copyFileSync(src, dest); + } + } + } + } + }, + }, + ], build: { rollupOptions: { input: getInputs(),