GithubHelp home page GithubHelp logo

osem-caddy's Introduction

Caddy for openSenseMap

We are using Caddy as our web server for our openSenseMap services.

Build own Image

docker build -t osem-caddy .

Run own Image

docker run \
  --volume $PWD/certs:/root/.caddy \
  --env WEB_DOMAIN=your.web.domain \
  --env API_DOMAIN=your.api.domain \
  --env INGRESS_DOMAIN=your.ingress.domain \
  --env ISSUER_ADDRESS=your.email@domain \
  --env ACME_CA_ENDPOINT=https://acme-staging-v02.api.letsencrypt.org/directory
  --publish 80:80 \
  --publish 443:443 \
  --publish 8000:8000 \
  caddy

By default the container is using the Production endpoint of Let´s encrypt. Change it to the Staging endpoint by using the env ACME_CA_ENDPOINT and not hitting rate-limits.

Also checkout our docker-compose.yml how to run it with Docker Compose.

It is possible to add additional vhosts through the ADDITIONAL_VHOSTS environment variable. The whole contents of this variable will be parsed as caddy directives.

Volumes

The default caddy configuration is activating the file_server directive under https://static.WEB_DOMAIN. To serve static files map a volume to /etc/caddy/roots/statics

Environmental Variables

For configuration there are the following env variables available:

Name Value Description
ACME_CA_ENDPOINT https://acme-v02.api.letsencrypt.org/directory Let´s Encrypt Endpoint
ISSUER_ADDRESS - Email address used when creating an ACME account with your CA.
API_DOMAIN - Your API domain
INGRESS_DOMAIN - Your Ingress domain
WEB_DOMAIN - Your Web domain
TTN_DOMAIN - Your TTN domain
TINGG_DOMAIN - Your TINGG domain
METRICS_DOMAIN - Your metrics domain
METRICS_USER - Your metrics basic auth user
METRICS_PASSWORD - Your metrics basic auth password
ADDITIONAL_VHOSTS - Additional hosts

Extending and adding new hosts

  • Go and update or create a new .enabled file inside the vhosts folder.
  • Check the documentation of Caddy for Caddyfile syntax

Caddy snippets

There are some Caddy snippets available that you can use in your site blocks so you don´t have to repeat everything

ratelimit

Adds rate limit support to your site.

Docs: https://github.com/mholt/caddy-ratelimit

import ratelimit events window

headerdown

Strips down the response headers. Must be used inside reverse_proxy directive.

import headerdown

stdout

Adds standard logging to stdout.

import stdout

osem-caddy's People

Contributors

mpfeil avatar ubergesundheit avatar abiosoft avatar webwurst avatar umut0 avatar tiefpunkt avatar

Stargazers

ax4 avatar

Watchers

James Cloos avatar  avatar Jan Wirwahn avatar Thomas Bartoschek avatar Mario Pesch avatar Björn Guntermann avatar  avatar

Forkers

tiefpunkt

osem-caddy's Issues

Add /account

add

  rewrite /account {
    regexp .*
    to /index.html
  }

to frontend

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.