Skip to content

Commit a319719

Browse files
committed
Add a networks section to bluegreen
1 parent 502d9f3 commit a319719

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

docs/bluegreen.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,38 @@ near-zero downtime and easy rollback.
44

55
![Blue/Green](assets/bluegreen.png)
66

7+
## Network
8+
9+
We'll have a few concerns:
10+
11+
1. A blue stack
12+
2. A green stack
13+
3. A front proxy
14+
4. Postgres
15+
16+
Create a network to link them:
17+
18+
```sh
19+
docker network create myapp
20+
```
21+
22+
And add it to the Compose file:
23+
24+
```yaml title="compose.yaml"
25+
networks:
26+
default:
27+
name: myapp
28+
external: true
29+
```
30+
731
## 1. Adjust the Compose file
832
933
### Remove exposed ports
1034
1135
Remove the `caddy` service's `ports:` section in `compose.yaml`.
1236

13-
We'll no longer expose ports in the stacks, instead a simple "front proxy" will
14-
sit in front of the two stacks, proxying to the active stack.
37+
We'll no longer expose ports in the stacks, instead the front proxy will sit in
38+
front of the two stacks, proxying to them.
1539

1640
### Serve HTTP-only in the stacks
1741

0 commit comments

Comments
 (0)