|
| 1 | +<!-- omit in toc --> |
1 | 2 | # Caddy Sablier Plugin |
2 | 3 |
|
3 | | -- [Caddy Sablier Plugin](#caddy-sablier-plugin) |
4 | | - - [Build the custom Caddy image with Sablier middleware in it](#build-the-custom-caddy-image-with-sablier-middleware-in-it) |
5 | | - - [By using the provided Dockerfile](#by-using-the-provided-dockerfile) |
6 | | - - [By updating your Caddy Dockerfile](#by-updating-your-caddy-dockerfile) |
7 | | - - [Configuration](#configuration) |
8 | | - - [Exemple with a minimal configuration](#exemple-with-a-minimal-configuration) |
9 | | - - [Running end-to-end tests](#running-end-to-end-tests) |
| 4 | +[](https://goreportcard.com/report/github.com/sablierapp/sablier-caddy-plugin) |
10 | 5 |
|
11 | | -## Build the custom Caddy image with Sablier middleware in it |
| 6 | +Start your containers on demand, shut them down automatically when there's no activity using Caddy. |
12 | 7 |
|
13 | | -In order to use the custom plugin for Caddy, you need to bundle it with Caddy. |
14 | | -Here I'll show you two options with Docker. |
| 8 | +- [Installation](#installation) |
| 9 | +- [Configuration](#configuration) |
| 10 | + - [Exemple with a minimal configuration](#exemple-with-a-minimal-configuration) |
15 | 11 |
|
16 | | -### By using the provided Dockerfile |
| 12 | +See the [official module page](https://caddyserver.com/docs/modules/http.handlers.sablier#github.com/sablierapp/sablier-caddy-plugin). |
17 | 13 |
|
18 | | -```bash |
19 | | -docker build https://github.com/sablierapp/sablier.git#v1.10.1:plugins/caddy -t caddy:with-sablier |
20 | | -``` |
| 14 | +## Installation |
| 15 | + |
| 16 | +This plugin does not come with a pre-built version of Caddy (see [#10](https://github.com/sablierapp/sablier-caddy-plugin/issues/10)). |
21 | 17 |
|
22 | | -**Note:** You can change `main` for any other branch (such as `beta`, or tags `v1.10.1`) |
| 18 | +You must build a custom version of Caddy with this plugin. See [](https://caddyserver.com/docs/build#xcaddy) for more information. |
23 | 19 |
|
24 | | -### By updating your Caddy Dockerfile |
25 | 20 |
|
26 | 21 | ```Dockerfile |
27 | | -ARG CADDY_VERSION=2.9.1 |
28 | | -FROM caddy:${CADDY_VERSION}-builder AS builder |
| 22 | +FROM caddy:2.10.2-builder AS builder |
29 | 23 |
|
30 | 24 | RUN xcaddy build \ |
31 | | - --with github.com/sablierapp/sablier/plugins/caddy |
| 25 | + --with github.com/sablierapp/sablier-caddy-plugin:v1.1.0 # x-release-please-version |
32 | 26 |
|
33 | | -FROM caddy:${CADDY_VERSION} |
| 27 | +FROM caddy:2.10.2 |
34 | 28 |
|
35 | 29 | COPY --from=builder /usr/bin/caddy /usr/bin/caddy |
36 | 30 | ``` |
@@ -75,13 +69,4 @@ Almost all options are optional and you can setup very simple rules to use the s |
75 | 69 | reverse_proxy myservice:port |
76 | 70 | } |
77 | 71 | } |
78 | | -``` |
79 | | - |
80 | | -## Running end-to-end tests |
81 | | - |
82 | | -1. Build local sablier |
83 | | - `docker build -t caddy:local .` |
84 | | -2. Build local caddy |
85 | | - `docker build -t sablierapp/sablier:local ../..` |
86 | | -3. Run test |
87 | | - `cd e2e/docker && bash ./run.sh` |
| 72 | +``` |
0 commit comments