Skip to content

Commit 74355da

Browse files
committed
Set the caddy container name explicitly
1 parent db381a2 commit 74355da

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

docs/bluegreen.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ We'll no longer expose ports in the stacks, instead a simple "front proxy" will
1212
sit in front of the two stacks, exposing ports and proxying to the active
1313
stack. So remove the Caddy service's `ports:` section in `compose.yaml`.
1414

15+
### Set the Caddy container name explicitly
16+
17+
This allows us to switch between the two stacks:
18+
19+
```yaml title="compose.yaml"
20+
caddy:
21+
container_name: ${STACK_NAME}_caddy
22+
```
23+
1524
### Serve http-only in the stacks
1625
1726
Set `CADDY_SITE_ADDRESS` to only `:80` (leaving TLS termination to the front
@@ -180,7 +189,7 @@ jobs:
180189
echo $GHCR_PAT | docker login ghcr.io -u ${{ github.actor }} --password-stdin
181190
cd ${{ steps.idle.outputs.IDLE }}
182191
docker compose pull -q
183-
docker compose up -d
192+
STACK_NAME=${{ steps.idle.outputs.IDLE }} docker compose up -d
184193
echo "${{ steps.idle.outputs.ACTIVE }}" > active_stack
185194
env:
186195
GHCR_PAT: ${{ secrets.GHCR_PAT }}

0 commit comments

Comments
 (0)