diff --git a/Caddyfile b/Caddyfile index 7bcb1dc..62caa42 100644 --- a/Caddyfile +++ b/Caddyfile @@ -1,5 +1,5 @@ -:8503 { - handle_path /api/* { +:9000 { + handle { root * /caddy/ try_files /index.json header Content-Type "application/json" @@ -7,6 +7,10 @@ status 503 } } + + log +} +:4200 { handle { root * /caddy/ try_files /index.html diff --git a/README.md b/README.md new file mode 100644 index 0000000..033b841 --- /dev/null +++ b/README.md @@ -0,0 +1,18 @@ +# Maintenance + +This repository provides a Caddy configuration which can be built into a docker image. + +Port 4200 serves a static html page from `/caddy/index.html` +Port 9000 serves a json response from `/caddy/index.json` + +## Building Locally + +`docker build .` + +## Running Locally + +`docker run -p 4200:4200 -p 9000:9000 sha256:` + +## Kubernetes + +You can mount some other file to these two paths to make it serve something else. diff --git a/index.json b/index.json index 44f7045..e917e53 100644 --- a/index.json +++ b/index.json @@ -1,7 +1,7 @@ { - "errors": [ - { - "message": "Garner Platform is down for Scheduled Maintenance." - } - ] + "errors": [ + { + "message": "Garner Platform is down for Scheduled Maintenance." + } + ] }