No description
Find a file
2025-08-17 21:43:59 +02:00
certificates Initial commit 2025-07-11 14:48:23 +02:00
control-server Fix certificate uploading 2025-07-30 20:29:16 +02:00
docker-entrypoint.d Some update 2025-08-17 21:43:59 +02:00
nginx Some update 2025-08-17 21:43:59 +02:00
scripts Some update 2025-07-19 18:40:55 +02:00
.dockerignore Some update 2025-07-19 18:40:55 +02:00
.gitignore Some update 2025-08-17 21:43:59 +02:00
Containerfile Some update 2025-08-17 21:43:59 +02:00
docker-compose.yml Some update 2025-08-17 21:43:59 +02:00
README.md Some update 2025-08-17 21:43:59 +02:00

This is a container that helps host a website.

Configuration

Requires the following mounts:

  • /etc/ssl/certs/<domain>: For certificates, fullchain.pem and privkey.pem. Also includes the control domain. Can be read-only if you don't use the built-in (control server) certificate management.
  • /var/www/html/<domain>: Website files, index.html goes right here, mount this read-only

Requires the following environment variables:

  • DOMAINS: One or more domains to handle, separated with ,s or spaces
  • ACME_CHALLENGE_HOST: The source of .well-known/acme-challenge. Proxied, may be internal. Don't forget to add
  • CONTROL_DOMAIN: Domain to access the control server
  • CONTROL_TOKEN: Token to access the control server

You're also encouraged to provide your own:

  • /etc/ssl/dhparam.pem (read-only), generated with:
    openssl dhparam -out dhparam.pem 4096
    
  • /etc/ssl/snakeoil.key (read-only) & /etc/ssl/snakeoil.pem (read-only), generated with:
    openssl req -new -x509 -days 398 -noenc -out snakeoil.pem -keyout snakeoil.key -subj "/C=AU/ST=Some-State/O=Internet Widgits Pty Ltd"
    
  • SERVER_ID: Label this server (informational, not used currently)

Control server

Authorize as you normally do with a Bearer token.

If you get an empty response, watch the status code!

Response format:

{
   "status": "ok|client_error|server_error",
   "message": "Optional, human-readable feedback message"
}

Endpoints:

  • /: Health check
  • /reload: Reloads nginx
  • /certificate/<domain>: Uploads a certificate (POST, upload like a form with field names certificate and private_key)

Custom nginx configs

Put custom configuration templates in the /templates/ directory

Stock config files, mount (read-only) to replace:

  • Control: control.conf.template (default)
  • Website: website.conf.btemplate (default) (not used hence diff extension)
  • Specific website: website-$DOMAIN.conf.template (generated)

TODO

  • support for multiple domains