docs: add documentation
All checks were successful
the build was successful

This commit is contained in:
Jan Christian Grünhage 2017-12-16 11:32:09 +01:00
parent 6cd8a76803
commit 1e23a2a6df
Signed by: jcgruenhage
GPG key ID: 6594C449C633D10C

80
README.md Normal file
View file

@ -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
```