Documentation

Deployment

Proxy Setup

We're going to use Caddy because it's lightweight, easy to configure, and abstracts away the complexity of SSL setup. It automatically handles HTTPS certificates using Let's Encrypt, making it a great choice for simple and secure deployments.

Based on Caddy Docs :

sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update
sudo apt install caddy

Verify:

systemctl status caddy

Let's add our sites:

sudo nano /etc/caddy/Caddyfile
api.shipdotnet.com {
    reverse_proxy localhost:5000    
}

shipdotnet.com {
    reverse_proxy localhost:3000
}

dashboard.shipdotnet.com {
  root * /var/www/apps/shipdotnet-dashboard
  try_files {path} /index.html
  file_server
}
sudo systemctl restart caddy