Skip to content

Repository files navigation

Blogfolio @hungvu.tech

Tech Stack & Core Services

Powered by:

  • Framework: Astro 7 (Static Site Generation, Content Layer API, zero-JS navigation by default).
  • Styling: Tailwind CSS v4 and DaisyUI 5.
  • Search: Pagefind (client-side, static search indexing).
  • Testing: Vitest (unit & component tests) and Playwright with Axe-core (E2E and accessibility audits).
  • Hosting & Infrastructure: Ubuntu VM on Proxmox, Cloudflare Tunnel (dynamic DNS and reverse proxy), and Caddy web server.

Local Development & Quality Checks

Prerequisites: Node.js (LTS) and pnpm (v12+).

# Install dependencies
pnpm install

# Start local dev server (http://localhost:4321)
pnpm run dev

# Code style checking & formatting
pnpm run lint
pnpm run format

# TypeScript & Astro template diagnostics
pnpm astro check

# Automated testing
pnpm run test:unit       # Vitest unit & component tests
pnpm run test:e2e        # Playwright E2E & WCAG accessibility tests

# Production build and search indexing
pnpm run build

Setup Instruction (Self-Hosting with Caddy)

  1. Clone repository to web server VM.
  2. Install nvm, then the latest Node LTS, and pnpm.
  3. Build the repository to create dist.
  4. Dowload Caddy binary to the VM using wget. No extra Caddy plugins needed.
  5. Install Caddy as system service using the official guide.
  6. Create Caddyfile at etc/caddy/Caddyfile.
  7. Run Caddy with sudo systemctl start caddy, and monitor live log with sudo journalctl -xefu caddy.
  8. Enable ports 80 and 443 with sudo ufw allow 80 and sudo ufw allow 443.
  9. Install cloudflared agent, either as a binary or Docker service.
  10. Within Cloudflare web UI, configure tunnel so it points toward Caddy VM.
  11. If cloudflared is on a different VM, then point to web server IP, otherwise, use localhost or 127.0.0.1.
  12. Enable No TLS Verify option within tunnel UI. Because we use a cert from Caddy CA. This is good enough for local traffic between cloudflared and Caddy. Otherwise, there will be an error ERR Request failed error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: tls: failed to verify certificate: x509: certificate signed by unknown authority
  13. Copy Astro dist to /var/lib/caddy, because the official guide instructs Caddy to run as a caddy user, which has no read permission to home. However, it can read /var/lib/caddy. Without this folder move, there will be an error "msg":"open /home/.../dist: permission denied"
  14. Now the website is live!

Sample Caddyfile

{
        debug
        skip_install_trust
}

hungvu.tech, server IP, localhost, 127.0.0.1 {
        tls internal
        root * /var/lib/caddy/dist
        file_server
        encode zstd gzip
}

Note skip_install_trust to avoid sudo promt on startup. While tls internal is for locally trusted cert.

"msg":"installing root certificate (you might be prompted for password)","path":"storage:pki/authorities/local/root.crt"
"msg":"warning: \"certutil\" is not available, install \"certutil\" with \"apt install libnss3-tools\" or \"yum install nss-tools\" and try again"
"msg":"define JAVA_HOME environment variable to use the Java trust"

Author

Hung Vu:

License

Copyright © 2026 Huu Hung Vu, All Rights Reserved.

About

The official repository for hungvu.tech

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages