Add SSL/TLS support with Certbot and update deployment guide

- nginx/ssl.conf: full HTTPS config with HTTP→HTTPS redirect, modern TLS
  settings, HSTS header, and ACME challenge passthrough for renewals
- nginx/certbot-init.conf: minimal HTTP config for initial cert provisioning
- docker-compose.ssl.yml: compose override adding port 443, certbot volumes,
  and auto-renewal sidecar container
- docs/DEPLOYMENT.md: comprehensive 3-phase SSL walkthrough (obtain cert,
  enable SSL, auto-renewal) with day-to-day usage and revert instructions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-02 14:28:01 -05:00
parent a550a8d0be
commit 42767e3119
4 changed files with 424 additions and 22 deletions

18
nginx/certbot-init.conf Normal file
View File

@@ -0,0 +1,18 @@
# Temporary nginx config — used ONLY during the initial certbot certificate
# request. Once the cert is obtained, switch to ssl.conf and restart nginx.
server {
listen 80;
server_name _;
# Certbot ACME challenge
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
# Return 503 for everything else so it's obvious this is not the real app
location / {
return 503 "SSL certificate is being provisioned. Try again in a minute.\n";
add_header Content-Type text/plain;
}
}