Skip to content

Commit 7905143

Browse files
committed
Update docker compose to use new yaml anchors
1 parent ae2ab6b commit 7905143

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

docker-compose.yml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
11
x-logging: &logging
2-
logging:
3-
driver: "json-file"
4-
options:
5-
max-file: "5"
6-
max-size: "10m"
2+
driver: "json-file"
3+
options:
4+
max-file: "5"
5+
max-size: "10m"
76

8-
x-restart-policy: &restart_policy
7+
x-default-settings: &default-settings
98
restart: unless-stopped
10-
11-
x-secure-containers: &secure_containers
129
privileged: false
1310
read_only: true # Prod uses a read-only fs, override this locally if it helps with debugging
1411
user: "65534" # Prod uses a non-root user, override this locally if it helps with debugging
1512

1613
services:
1714
postgres:
18-
<< : *logging
19-
<< : *restart_policy
15+
logging: *logging
2016
image: postgres:13-alpine
2117
ports:
2218
- "127.0.0.1:7777:5432"
@@ -31,9 +27,8 @@ services:
3127
retries: 5
3228

3329
api:
34-
<< : *logging
35-
<< : *restart_policy
36-
<< : *secure_containers
30+
<< : *default-settings
31+
logging: *logging
3732
build:
3833
context: .
3934
args:

0 commit comments

Comments
 (0)