File tree Expand file tree Collapse file tree 1 file changed +23
-14
lines changed
Expand file tree Collapse file tree 1 file changed +23
-14
lines changed Original file line number Diff line number Diff line change @@ -12,22 +12,8 @@ stack", now there is:
12123 . A front proxy to direct traffic
13134 . 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
6753So 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
7180To share data between the two stacks (uploads, etc.), give volumes explicit
You can’t perform that action at this time.
0 commit comments