Raspberry Pi Docker-Hosted Portfolio

Self-hosted static website deployment using Raspberry Pi, Docker, and NGINX.

Raspberry PiDockerNGINXHTML/CSSLinux

Project Goal

Build a self-hosted portfolio that also demonstrates infrastructure skills.

This project was built to host a personal portfolio from Raspberry Pi hardware instead of relying on a traditional hosted platform. It highlights practical experience with Linux, Docker, NGINX, static site hosting, file mounts, and web publishing in a homelab environment.

Environment and Stack

Observed deployment details from the running host.

  • Container name: mysite
  • Image: nginx:alpine
  • Published port: 8082 -> 80
  • Site content mount: /var/www/html/New -> /usr/share/nginx/html
  • NGINX config mount: /opt/mysite-nginx/default.conf -> /etc/nginx/conf.d/default.conf

How It Was Done

High-level deployment workflow.

  1. Built a static multi-page portfolio using HTML and CSS.
  2. Stored the website files on the Raspberry Pi host so the content remains outside the container.
  3. Started an NGINX container using the lightweight Alpine-based image.
  4. Bind-mounted the portfolio directory into the default NGINX web root as read-only.
  5. Bind-mounted a custom default.conf file to control how the site is served.
  6. Published the container on host port 8082 so the site could be reached locally and through external publishing methods.
  7. Updated the site by editing the host files directly, which allows changes to appear immediately without rebuilding the container image.

NGINX and Security Notes

Baseline hardening applied to the static site.

  • Server version tokens are disabled.
  • Directory listing is turned off.
  • Hidden dotfiles are blocked.
  • Security headers include Content Security Policy, Referrer Policy, and X-Content-Type-Options.
  • The default index is set to resume.html.

Why This Matters

Skills demonstrated by the project.

  • Containerized deployment of a web service
  • Linux file system management and bind mounts
  • Basic web server configuration and security hardening
  • Self-hosting and homelab service management
  • Maintaining a professional portfolio with real infrastructure behind it

Future Improvements

Planned areas for expansion.

  • Add architecture diagrams and screenshots
  • Document backup and restore workflow
  • Add HTTPS and reverse proxy notes
  • Automate publishing or version-controlled updates