Skip to content

sn00pster/caddy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Caddy

Custom docker image based on abiosoft/caddy.

The only differences are that this image is built with the following plugins:

and telemetry stats are disabled.

I originally had issues with telemetry timing out causing Caddy to hang on startup so they are disabled.

Note: This image was updated to Caddy 1.0 but no longer includes the filebrowser plugin as it's currently not compatible.

Using Cloudflare DNS plugin

When you deploy your docker container you must pass the following env variables in order for the cloudflare plugin to work.

-e CLOUDFLARE_EMAIL=<[email protected]>
-e CLOUDFLARE_API_KEY=<your-cf-api-key>
domain.tld {
    tls {
        dns cloudflare
    }
}

Your Cloudflare API key can be found under your Cloudflare account.

Using GoogleCloud DNS plugin

Pass the following during deploy:

-e GCE_PROJECT=<project_name>
-e GCE_DOMAIN=<domain.tld>
-e GOOGLE_APPLICATION_CREDENTIALS=<credentials> 
~OR~ 
-e GCE_SERVICE_ACCOUNT_FILE=<credentials-json-file>
domain.tld {
    tls {
        dns googlecloud
    }
}

Example docker-compose file.

version: '3.6'
services:
  caddy:
    deploy:
      replicas: 1
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "curl", "-I", "http://localhost"]
      interval: 1m30s
      timeout: 10s
      retries: 3
      start_period: 40s
    image: alexandzors/caddy
    ports:
      - "81:80"
      - "444:443"
      - "2015:2015"
    volumes:
      - /path/to/Caddyfile:/etc/Caddyfile
      - /path/to/caddy/dir:/root/.caddy
      - /path/to/sites/root:/srv
    environment:
      - ACME_AGREE=true
      - CLOUDFLARE_EMAIL=<CF_EMAIL>
      - CLOUDFLARE_API_KEY=<CF_API_KEY>

About

Custom abiosoft/caddy-docker image

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 50.4%
  • HTML 42.4%
  • Shell 7.2%