diff --git a/README.md b/README.md new file mode 100644 index 0000000..b36942c --- /dev/null +++ b/README.md @@ -0,0 +1,80 @@ +## docker.jcg.re/caddy +[![Build Status](https://drone.jcg.re/api/badges/jcgruenhage/docker-caddy/status.svg)](https://drone.jcg.re/jcgruenhage/docker-caddy) +#### Tags: + - **latest**: latest stable version (currently 0.10.10) + - **v0.10.10**: v0.10.10 of caddy + - **v0.10.9**: v0.10.9 of caddy + - **v0.10.8**: v0.10.8 of caddy + - **v0.10.7**: v0.10.7 of caddy + - **v0.10.6**: v0.10.6 of caddy + - **v0.10.5**: v0.10.5 of caddy + - **v0.10.4**: v0.10.4 of caddy +#### Build-time variables + - **CLONE_URL**: From where to clone caddy (default: https://github.com/mholt/caddy.git) + - **BRANCH**: Which branch to use. (default: `latest stable tag) + +#### Environment variables + - **UID**: user id (default: 192) + - **GID**: group id (default: 192) + - **DOMAIN**: the domain that should be served (required for automatic tls) + - **EMAIL**: the email address to use for let's encrypt (required for automatic tls) + - **USE_QUIC**: set this to anything to enable experimental quic support (default: off) + - **LE_STAGING**: use staging let's encrypt endpoint (default: off -> production) + +#### Volumes + - **/etc/Caddyfile**: webserver configuration (optional) + - **/var/www/**: content to serve + - **/caddy**: caddy will store it's certificates here (recommended if tls is active) + +#### Ports + - 80 + - 443 + +#### Basic docker-compose.yml example +Insecure example serving the contents of `./website`on port 80: +```yaml +version: '2' + +services: + caddy: + image: docker.jcg.re/caddy + container_name: caddy + ports: + - 80:80 + volumes: + - ./website:/var/www/ +``` + +Secure example serving the contents of `./website`on https://example.com/ with an automatic redirect to https: +```yaml +version: '2' + +services: + caddy: + image: docker.jcg.re/caddy + container_name: caddy + ports: + - 80:80 + - 443:443 + volumes: + - ./website:/var/www/ + environment: + - DOMAIN=example.com + - EMAIL=you@example.com +``` + +Custom example doing whatever-the-fuck-you-want (take a look at https://caddyserver.com/docs): +```yaml +version: '2' + +services: + caddy: + image: docker.jcg.re/caddy + container_name: caddy + ports: + - 80:80 + - 443:443 + volumes: + - ./website:/var/www + - ./Caddyfile:/etc/Caddyfile +```