Skip to content

Commit

Permalink
docs(caddy): update documentation with remote Dockerfile build (#442)
Browse files Browse the repository at this point in the history
* docs(caddy): update documentation with remote Dockerfile build

* update doc version script
  • Loading branch information
acouvreur authored Nov 6, 2024
1 parent a958703 commit 6c25b10
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 26 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ update-doc-version:
update-doc-version-middleware:
find . -type f \( -name "*.md" -o -name "*.yml" \) -exec sed -i 's/version: "v$(LAST)"/version: "v$(NEXT)"/g' {} +
find . -type f \( -name "*.md" -o -name "*.yml" \) -exec sed -i 's/version=v$(LAST)/version=v$(NEXT)/g' {} +
sed -i 's/SABLIER_VERSION=v$(LAST)/SABLIER_VERSION=v$(NEXT)/g' plugins/caddy/Dockerfile.remote
sed -i 's/SABLIER_VERSION=v$(LAST)/SABLIER_VERSION=v$(NEXT)/g' plugins/caddy/remote.Dockerfile
sed -i 's/v$(LAST)/v$(NEXT)/g' plugins/caddy/README.md

.PHONY: docs
Expand Down
12 changes: 0 additions & 12 deletions plugins/caddy/Dockerfile.remote

This file was deleted.

22 changes: 9 additions & 13 deletions plugins/caddy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,20 @@ Here I'll show you two options with Docker.

### By using the provided Dockerfile

```
docker build https://github.com/sablierapp/sablier.git#v1.8.1-beta.22:plugins/caddy
--build-arg=CADDY_VERSION=2.6.4
-t caddy:2.6.4-with-sablier
```bash
docker build https://github.com/sablierapp/sablier.git#v1.8.1:plugins/caddy -t caddy:with-sablier
```

**Note:** You can change `main` for any other branch (such as `beta`, or tags `v1.8.1-beta.22`)
**Note:** You can change `main` for any other branch (such as `beta`, or tags `v1.8.1`)

### By updating your Caddy Dockerfile

```
ARG CADDY_VERSION=2.6.4
```Dockerfile
ARG CADDY_VERSION=2.8.4
FROM caddy:${CADDY_VERSION}-builder AS builder

ADD https://github.com/sablierapp/sablier.git#v1.8.1-beta.22 /sablier
RUN xcaddy build \
--with github.com/sablierapp/sablier/plugins/caddy=/sablier/plugins/caddy
--with github.com/sablierapp/sablier/plugins/caddy

FROM caddy:${CADDY_VERSION}

Expand All @@ -43,7 +39,7 @@ COPY --from=builder /usr/bin/caddy /usr/bin/caddy

You can have the following configuration:

```
```Caddyfile
:80 {
route /my/route {
sablier [<sablierURL>=http://sablier:10000] {
Expand All @@ -69,7 +65,7 @@ You can have the following configuration:

Almost all options are optional and you can setup very simple rules to use the server default values.

```
```Caddyfile
:80 {
route /my/route {
sablier {
Expand All @@ -81,7 +77,7 @@ Almost all options are optional and you can setup very simple rules to use the s
}
```

## Running end to end tests
## Running end-to-end tests

1. Build local sablier
`docker build -t caddy:local .`
Expand Down
9 changes: 9 additions & 0 deletions plugins/caddy/remote.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
ARG CADDY_VERSION=2.8.4
FROM caddy:${CADDY_VERSION}-builder AS builder

RUN xcaddy build \
--with github.com/sablierapp/sablier/plugins/caddy

FROM caddy:${CADDY_VERSION}

COPY --from=builder /usr/bin/caddy /usr/bin/caddy

0 comments on commit 6c25b10

Please sign in to comment.