Skip to content

Commit c7b0ae8

Browse files
committed
chore: apply dclint fixes
Fixes applied manually. For automated fixes there is issue with YAML output it generates.
1 parent f15bbbf commit c7b0ae8

6 files changed

+150
-135
lines changed

.dclintrc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
rules:
2+
no-unbound-port-interfaces: 0
3+
service-image-require-explicit-tag: 0
4+
require-project-name-field: 0

.pre-commit-config.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,17 @@ repos:
4545
rev: v3.10.0-2
4646
hooks:
4747
- id: shfmt
48+
- repo: local
49+
hooks:
50+
- id: dclint
51+
name: Docker Compose Linter
52+
entry: dclint .
53+
language: node
54+
require_serial: true
55+
pass_filenames: false
56+
additional_dependencies:
57+
58+
4859

4960
ci:
5061
autoupdate_schedule: quarterly

docker-compose-https.yml

+28-28
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
11
services:
2-
weblate:
3-
image: weblate/weblate
4-
tmpfs:
5-
- /run
6-
- /tmp
2+
cache:
3+
image: redis:7-alpine
74
volumes:
8-
- weblate-data:/app/data
9-
- weblate-cache:/app/cache
10-
env_file:
11-
- ./environment
5+
- redis-data:/data
6+
command: [redis-server, --save, '60', '1']
127
restart: always
138
read_only: true
14-
depends_on:
15-
- database
16-
- cache
17-
environment:
18-
WEBLATE_ENABLE_HTTPS: 1
19-
WEBLATE_IP_PROXY_HEADER: HTTP_X_FORWARDED_FOR
209
database:
2110
image: postgres:17-alpine
22-
env_file:
23-
- ./environment
2411
volumes:
2512
- postgres-data:/var/lib/postgresql/data
13+
env_file:
14+
- ./environment
2615
restart: always
27-
cache:
28-
image: redis:7-alpine
29-
restart: always
30-
read_only: true
31-
command: [redis-server, --save, '60', '1']
32-
volumes:
33-
- redis-data:/data
3416
https-portal:
3517
image: steveltn/https-portal:1
18+
volumes:
19+
- ssl-certs:/var/lib/https-portal
20+
environment:
21+
STAGE: production
22+
PROXY_READ_TIMEOUT: 3600
3623
ports:
3724
- 80:80
3825
- 443:443
3926
restart: always
40-
environment:
41-
STAGE: production
42-
PROXY_READ_TIMEOUT: 3600
27+
weblate:
28+
image: weblate/weblate
29+
depends_on:
30+
- cache
31+
- database
4332
volumes:
44-
- ssl-certs:/var/lib/https-portal
33+
- weblate-data:/app/data
34+
- weblate-cache:/app/cache
35+
environment:
36+
WEBLATE_ENABLE_HTTPS: 1
37+
WEBLATE_IP_PROXY_HEADER: HTTP_X_FORWARDED_FOR
38+
env_file:
39+
- ./environment
40+
restart: always
41+
read_only: true
42+
tmpfs:
43+
- /run
44+
- /tmp
4545
volumes:
4646
weblate-cache: {}
4747
weblate-data: {}

docker-compose-single-celery.yml

+19-19
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
services:
2-
weblate:
3-
image: weblate/weblate
4-
tmpfs:
5-
- /run
6-
- /tmp
2+
cache:
3+
image: redis:7-alpine
74
volumes:
8-
- weblate-data:/app/data
9-
- weblate-cache:/app/cache
5+
- redis-data:/data
6+
command: [redis-server, --save, '60', '1']
7+
restart: always
8+
read_only: true
9+
database:
10+
image: postgres:17-alpine
11+
volumes:
12+
- postgres-data:/var/lib/postgresql/data
1013
env_file:
1114
- ./environment
1215
restart: always
13-
read_only: true
16+
weblate:
17+
image: weblate/weblate
1418
depends_on:
15-
- database
1619
- cache
20+
- database
21+
volumes:
22+
- weblate-data:/app/data
23+
- weblate-cache:/app/cache
1724
environment:
1825
SINGLE_CELERY_PROCESS: 1
19-
database:
20-
image: postgres:17-alpine
2126
env_file:
2227
- ./environment
23-
volumes:
24-
- postgres-data:/var/lib/postgresql/data
25-
restart: always
26-
cache:
27-
image: redis:7-alpine
2828
restart: always
2929
read_only: true
30-
command: [redis-server, --save, '60', '1']
31-
volumes:
32-
- redis-data:/data
30+
tmpfs:
31+
- /run
32+
- /tmp
3333
volumes:
3434
weblate-cache: {}
3535
weblate-data: {}

docker-compose-split.yml

+69-69
Original file line numberDiff line numberDiff line change
@@ -1,169 +1,169 @@
11
services:
2+
cache:
3+
image: redis:7-alpine
4+
volumes:
5+
- redis-data:/data
6+
command: [redis-server, --save, '60', '1']
7+
restart: always
8+
read_only: true
9+
database:
10+
image: postgres:17-alpine
11+
volumes:
12+
- postgres-data:/var/lib/postgresql/data
13+
env_file:
14+
- ./environment
15+
restart: always
216
weblate:
317
image: weblate/weblate
4-
tmpfs:
5-
- /run
6-
- /tmp
7-
- /app/cache
18+
depends_on:
19+
- cache
20+
- database
21+
- weblate-celery-beat
822
volumes:
923
- type: volume
1024
source: weblate-data
1125
target: /app/data
26+
environment:
27+
WEBLATE_SERVICE: web
1228
env_file:
1329
- ./environment
1430
restart: always
1531
read_only: true
16-
depends_on:
17-
- database
18-
- cache
19-
- weblate-celery-beat
20-
environment:
21-
WEBLATE_SERVICE: web
22-
weblate-celery-backup:
23-
image: weblate/weblate
2432
tmpfs:
2533
- /run
2634
- /tmp
2735
- /app/cache
36+
weblate-celery-backup:
37+
image: weblate/weblate
38+
depends_on:
39+
- cache
40+
- database
41+
- weblate-celery-beat
2842
volumes:
2943
- type: volume
3044
source: weblate-data
3145
target: /app/data
3246
volume:
3347
nocopy: true
48+
environment:
49+
WEBLATE_SERVICE: celery-backup
3450
env_file:
3551
- ./environment
3652
restart: always
3753
read_only: true
38-
depends_on:
39-
- database
40-
- cache
41-
- weblate-celery-beat
42-
environment:
43-
WEBLATE_SERVICE: celery-backup
44-
weblate-celery-beat:
45-
image: weblate/weblate
4654
tmpfs:
4755
- /run
4856
- /tmp
4957
- /app/cache
58+
weblate-celery-beat:
59+
image: weblate/weblate
60+
depends_on:
61+
- cache
62+
- database
5063
volumes:
5164
- type: volume
5265
source: weblate-data
5366
target: /app/data
5467
volume:
5568
nocopy: true
69+
environment:
70+
WEBLATE_SERVICE: celery-beat
5671
env_file:
5772
- ./environment
5873
restart: always
5974
read_only: true
60-
depends_on:
61-
- database
62-
- cache
63-
environment:
64-
WEBLATE_SERVICE: celery-beat
65-
weblate-celery-celery:
66-
image: weblate/weblate
6775
tmpfs:
6876
- /run
6977
- /tmp
7078
- /app/cache
79+
weblate-celery-celery:
80+
image: weblate/weblate
81+
depends_on:
82+
- cache
83+
- database
84+
- weblate-celery-beat
7185
volumes:
7286
- type: volume
7387
source: weblate-data
7488
target: /app/data
7589
volume:
7690
nocopy: true
91+
environment:
92+
WEBLATE_SERVICE: celery-celery
7793
env_file:
7894
- ./environment
7995
restart: always
8096
read_only: true
81-
depends_on:
82-
- database
83-
- cache
84-
- weblate-celery-beat
85-
environment:
86-
WEBLATE_SERVICE: celery-celery
87-
weblate-celery-memory:
88-
image: weblate/weblate
8997
tmpfs:
9098
- /run
9199
- /tmp
92100
- /app/cache
101+
weblate-celery-memory:
102+
image: weblate/weblate
103+
depends_on:
104+
- cache
105+
- database
106+
- weblate-celery-beat
93107
volumes:
94108
- type: volume
95109
source: weblate-data
96110
target: /app/data
97111
volume:
98112
nocopy: true
113+
environment:
114+
WEBLATE_SERVICE: celery-memory
99115
env_file:
100116
- ./environment
101117
restart: always
102118
read_only: true
103-
depends_on:
104-
- database
105-
- cache
106-
- weblate-celery-beat
107-
environment:
108-
WEBLATE_SERVICE: celery-memory
109-
weblate-celery-notify:
110-
image: weblate/weblate
111119
tmpfs:
112120
- /run
113121
- /tmp
114122
- /app/cache
123+
weblate-celery-notify:
124+
image: weblate/weblate
125+
depends_on:
126+
- cache
127+
- database
128+
- weblate-celery-beat
115129
volumes:
116130
- type: volume
117131
source: weblate-data
118132
target: /app/data
119133
volume:
120134
nocopy: true
135+
environment:
136+
WEBLATE_SERVICE: celery-notify
121137
env_file:
122138
- ./environment
123139
restart: always
124140
read_only: true
125-
depends_on:
126-
- database
127-
- cache
128-
- weblate-celery-beat
129-
environment:
130-
WEBLATE_SERVICE: celery-notify
131-
weblate-celery-translate:
132-
image: weblate/weblate
133141
tmpfs:
134142
- /run
135143
- /tmp
136144
- /app/cache
145+
weblate-celery-translate:
146+
image: weblate/weblate
147+
depends_on:
148+
- cache
149+
- database
150+
- weblate-celery-beat
137151
volumes:
138152
- type: volume
139153
source: weblate-data
140154
target: /app/data
141155
volume:
142156
nocopy: true
143-
env_file:
144-
- ./environment
145-
restart: always
146-
read_only: true
147-
depends_on:
148-
- database
149-
- cache
150-
- weblate-celery-beat
151157
environment:
152158
WEBLATE_SERVICE: celery-translate
153-
database:
154-
image: postgres:17-alpine
155159
env_file:
156160
- ./environment
157-
volumes:
158-
- postgres-data:/var/lib/postgresql/data
159-
restart: always
160-
cache:
161-
image: redis:7-alpine
162161
restart: always
163162
read_only: true
164-
command: [redis-server, --save, '60', '1']
165-
volumes:
166-
- redis-data:/data
163+
tmpfs:
164+
- /run
165+
- /tmp
166+
- /app/cache
167167
volumes:
168168
weblate-data: {}
169169
postgres-data: {}

0 commit comments

Comments
 (0)