Feb 16, 2026

Deploying With Docker and Caddy on Ubuntu

A practical setup for running a static React portfolio in a container behind Caddy.

Docker container served behind Caddy reverse proxy
dockercaddyubuntudeploy

Deployment Notes

The production shape is straightforward:

  • Build static assets with Vite.
  • Serve files with Nginx in a container.
  • Keep Caddy on the host to manage TLS and reverse proxy.

Why this split works

Caddy handles certificates and routing. The app container only serves static files. Each part stays focused and easy to replace.

docker compose up -d --build

Then Caddy routes your domain to 127.0.0.1:8080.

Result

This gives low complexity, low runtime overhead, and predictable deployments.