Giter VIP home page Giter VIP logo

caddyproxy-docker's Introduction

This image runs Caddyserver as a simple proxy. By setting two environment variables you can move it from development to your (simple) production server with Let's Encrypt enabled.

By default this proxy points from localhost:80 to web:8000 and does not enable Let's Encrypt. To alter this behavior, set these environment variables:

  • PROXY_FROM domain
  • PROXY_TO local:port
  • ACME_EMAIL [email protected]
  • MAX_CERTS If set to >1, enables "on-demand" certificates, allowing Caddy to obtain certificates as domains are requested. See the 0.8.2 release notes for the initial idea.

PROXY_FROM can be set to a specific port, but this may break Let's Encrypt certificates. To leave Let's Encrypt disabled, set ACME_EMAIL to "off" (or leave it at the default).

For example, Google might use this by setting PROXY_FROM = www.google.com and ACME_EMAIL = [email protected].

For development, you may want to set PROXY_FROM = :80. This will allow Caddy to be accessible from any host, useful if you're using other devices/VMs to access the dev site.

Saving Certificates

Let's Encrypt certificates are saved by default to $HOME/.caddy. You should mount this as a volume. If you do not, you risk overrunning your LE limit.

You can also set CADDYPATH to define a different location inside the container for certificates to be stored. This is probably the safest option as it ensures any future docker image changes don't interfere with your ability to save certificates!

Dumb-init

Dumb-init is the hottest thing since sliced bread. If you've ever had issues with signals being sent to your Docker containers, check out https://github.com/Yelp/dumb-init.

Credit

This Dockerfile was originally taken from https://hub.docker.com/r/abiosoft/caddy/.

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.