/caddy-aws-ready

Caddy Server with AWS modules

Primary LanguageDockerfile

caddy-aws-ready

AWS ready caddy server image impliments, extra optional modules to interact with dynamoDB or S3 for certmagic storage and allow caddy to be a reverse proxy for S3 which brings extra features to static hosting.

caddy.storage.dynamodb

https://github.com/silinternational/certmagic-storage-dynamodb

caddy.storage.dynamodb implements certmagic.Storage to facilitate storage of certificates in DynamoDB for a clustered environment. Also implements certmagic.Locker to facilitate locking and unlocking of cert data during storage

This image is preconfigured to work with a dynamoDB table called CertMagic you can terrafom the table with the following:

resource "aws_dynamodb_table" "CertMagic" {
  name           = "CertMagic"
  billing_mode   = "PAY_PER_REQUEST"
  hash_key       = "PrimaryKey"

  attribute {
    name = "PrimaryKey"
    type = "S"
  }
}
{
	"table": "",
	"aws_endpoint": "",
	"aws_region": "",
	"aws_disable_ssl": false,
	"lock_timeout": 0,
	"lock_polling_interval": 0
}

Field List

table

  • There are no docs for this property.

aws_endpoint

  • There are no docs for this property.

aws_region

  • There are no docs for this property.

aws_disable_ssl

  • There are no docs for this property.

lock_timeout

  • Duration can be an integer or a string. An integer is interpreted as nanoseconds. If a string, it is a Go time.Duration value such as 300ms, 1.5h, or 2h45m; valid units are ns, us/µs, ms, s, m, h, and d.

lock_polling_interval

  • Duration can be an integer or a string. An integer is interpreted as nanoseconds. If a string, it is a Go time.Duration value such as 300ms, 1.5h, or 2h45m; valid units are ns, us/µs, ms, s, m, h, and d.

http.handlers.s3proxy

https://github.com/lindenlab/caddy-s3-proxy

http.handlers.s3proxy implements a proxy to return, set, delete or browse objects from S3

{
	"root": "",
	"region": "",
	"bucket": "",
	"endpoint": "",
	"index_names": [""],
	"error_pages": {
		0: ""
	},
	"default_error_page": "",
	"force_path_style": false,
	"use_accelerate": false
}

Field List

root

  • The path to the root of the site. Default is {http.vars.root} if set, Or if not set the value is "" - meaning use the whole path as a key.

region

  • The AWS region the bucket is hosted in

bucket

  • The name of the S3 bucket

endpoint

  • Use non-standard endpoint for S3

index_names

  • The names of files to try as index files if a folder is requested.

error_pages

  • Mapping of HTTP error status to S3 keys or pass through option.

default_error_page

  • S3 key to a default error page or pass through option.

force_path_style

  • Set this to true to force the request to use path-style addressing.

use_accelerate

  • Set this to true to enable S3 Accelerate feature.