Giter VIP home page Giter VIP logo

caddy's Introduction

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.

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>

caddy's People

Contributors

alexandzors avatar sintaxasn avatar

Watchers

 avatar

Forkers

sn00pster

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.