Skip to content

Commit 5340cef

Browse files
authored
Update bluegreen.md
1 parent 10aca72 commit 5340cef

File tree

1 file changed

+23
-14
lines changed

1 file changed

+23
-14
lines changed

docs/bluegreen.md

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,8 @@ stack", now there is:
1212
3. A front proxy to direct traffic
1313
4. An external Postgres.
1414

15-
## 1. Create a Docker Network
1615

17-
Create a network to link them:
1816

19-
```sh
20-
docker network create app
21-
```
22-
23-
And add it to the Compose file:
24-
25-
```yaml title="compose.yaml"
26-
networks:
27-
default:
28-
name: app
29-
external: true
30-
```
3117

3218
## 2. Adjust Caddy
3319

@@ -66,6 +52,29 @@ access the same shared volume.
6652

6753
So we need to move Postgres out of the compose file and start it separately.
6854

55+
Create a network:
56+
57+
```sh
58+
docker network create shared
59+
```
60+
61+
And add it to the Compose file:
62+
63+
```yaml title="compose.yaml"
64+
networks:
65+
shared:
66+
name: shared
67+
external: true
68+
```
69+
70+
then in services that need db access:
71+
72+
```yaml title="compose.yaml"
73+
networks:
74+
- default
75+
- shared
76+
```
77+
6978
## 3. Volumes
7079

7180
To share data between the two stacks (uploads, etc.), give volumes explicit

0 commit comments

Comments
 (0)