Skip to content

Commit f78d6d5

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 f78d6d5

6 files changed

+153
-135
lines changed

.dclintrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
rules:
2+
no-unbound-port-interfaces: 0
3+
service-image-require-explicit-tag: 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

+29-28
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,48 @@
1+
name: Weblate (HTTPS)
12
services:
2-
weblate:
3-
image: weblate/weblate
4-
tmpfs:
5-
- /run
6-
- /tmp
3+
cache:
4+
image: redis:7-alpine
75
volumes:
8-
- weblate-data:/app/data
9-
- weblate-cache:/app/cache
10-
env_file:
11-
- ./environment
6+
- redis-data:/data
7+
command: [redis-server, --save, '60', '1']
128
restart: always
139
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
2010
database:
2111
image: postgres:17-alpine
22-
env_file:
23-
- ./environment
2412
volumes:
2513
- postgres-data:/var/lib/postgresql/data
14+
env_file:
15+
- ./environment
2616
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
3417
https-portal:
3518
image: steveltn/https-portal:1
19+
volumes:
20+
- ssl-certs:/var/lib/https-portal
21+
environment:
22+
STAGE: production
23+
PROXY_READ_TIMEOUT: 3600
3624
ports:
3725
- 80:80
3826
- 443:443
3927
restart: always
40-
environment:
41-
STAGE: production
42-
PROXY_READ_TIMEOUT: 3600
28+
weblate:
29+
image: weblate/weblate
30+
depends_on:
31+
- cache
32+
- database
4333
volumes:
44-
- ssl-certs:/var/lib/https-portal
34+
- weblate-data:/app/data
35+
- weblate-cache:/app/cache
36+
environment:
37+
WEBLATE_ENABLE_HTTPS: 1
38+
WEBLATE_IP_PROXY_HEADER: HTTP_X_FORWARDED_FOR
39+
env_file:
40+
- ./environment
41+
restart: always
42+
read_only: true
43+
tmpfs:
44+
- /run
45+
- /tmp
4546
volumes:
4647
weblate-cache: {}
4748
weblate-data: {}

docker-compose-single-celery.yml

+20-19
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,36 @@
1+
name: Weblate (single Celery process)
12
services:
2-
weblate:
3-
image: weblate/weblate
4-
tmpfs:
5-
- /run
6-
- /tmp
3+
cache:
4+
image: redis:7-alpine
75
volumes:
8-
- weblate-data:/app/data
9-
- weblate-cache:/app/cache
6+
- redis-data:/data
7+
command: [redis-server, --save, '60', '1']
8+
restart: always
9+
read_only: true
10+
database:
11+
image: postgres:17-alpine
12+
volumes:
13+
- postgres-data:/var/lib/postgresql/data
1014
env_file:
1115
- ./environment
1216
restart: always
13-
read_only: true
17+
weblate:
18+
image: weblate/weblate
1419
depends_on:
15-
- database
1620
- cache
21+
- database
22+
volumes:
23+
- weblate-data:/app/data
24+
- weblate-cache:/app/cache
1725
environment:
1826
SINGLE_CELERY_PROCESS: 1
19-
database:
20-
image: postgres:17-alpine
2127
env_file:
2228
- ./environment
23-
volumes:
24-
- postgres-data:/var/lib/postgresql/data
25-
restart: always
26-
cache:
27-
image: redis:7-alpine
2829
restart: always
2930
read_only: true
30-
command: [redis-server, --save, '60', '1']
31-
volumes:
32-
- redis-data:/data
31+
tmpfs:
32+
- /run
33+
- /tmp
3334
volumes:
3435
weblate-cache: {}
3536
weblate-data: {}

docker-compose-split.yml

+70-69
Original file line numberDiff line numberDiff line change
@@ -1,169 +1,170 @@
1+
name: Weblate (split services)
12
services:
3+
cache:
4+
image: redis:7-alpine
5+
volumes:
6+
- redis-data:/data
7+
command: [redis-server, --save, '60', '1']
8+
restart: always
9+
read_only: true
10+
database:
11+
image: postgres:17-alpine
12+
volumes:
13+
- postgres-data:/var/lib/postgresql/data
14+
env_file:
15+
- ./environment
16+
restart: always
217
weblate:
318
image: weblate/weblate
4-
tmpfs:
5-
- /run
6-
- /tmp
7-
- /app/cache
19+
depends_on:
20+
- cache
21+
- database
22+
- weblate-celery-beat
823
volumes:
924
- type: volume
1025
source: weblate-data
1126
target: /app/data
27+
environment:
28+
WEBLATE_SERVICE: web
1229
env_file:
1330
- ./environment
1431
restart: always
1532
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
2433
tmpfs:
2534
- /run
2635
- /tmp
2736
- /app/cache
37+
weblate-celery-backup:
38+
image: weblate/weblate
39+
depends_on:
40+
- cache
41+
- database
42+
- weblate-celery-beat
2843
volumes:
2944
- type: volume
3045
source: weblate-data
3146
target: /app/data
3247
volume:
3348
nocopy: true
49+
environment:
50+
WEBLATE_SERVICE: celery-backup
3451
env_file:
3552
- ./environment
3653
restart: always
3754
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
4655
tmpfs:
4756
- /run
4857
- /tmp
4958
- /app/cache
59+
weblate-celery-beat:
60+
image: weblate/weblate
61+
depends_on:
62+
- cache
63+
- database
5064
volumes:
5165
- type: volume
5266
source: weblate-data
5367
target: /app/data
5468
volume:
5569
nocopy: true
70+
environment:
71+
WEBLATE_SERVICE: celery-beat
5672
env_file:
5773
- ./environment
5874
restart: always
5975
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
6776
tmpfs:
6877
- /run
6978
- /tmp
7079
- /app/cache
80+
weblate-celery-celery:
81+
image: weblate/weblate
82+
depends_on:
83+
- cache
84+
- database
85+
- weblate-celery-beat
7186
volumes:
7287
- type: volume
7388
source: weblate-data
7489
target: /app/data
7590
volume:
7691
nocopy: true
92+
environment:
93+
WEBLATE_SERVICE: celery-celery
7794
env_file:
7895
- ./environment
7996
restart: always
8097
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
8998
tmpfs:
9099
- /run
91100
- /tmp
92101
- /app/cache
102+
weblate-celery-memory:
103+
image: weblate/weblate
104+
depends_on:
105+
- cache
106+
- database
107+
- weblate-celery-beat
93108
volumes:
94109
- type: volume
95110
source: weblate-data
96111
target: /app/data
97112
volume:
98113
nocopy: true
114+
environment:
115+
WEBLATE_SERVICE: celery-memory
99116
env_file:
100117
- ./environment
101118
restart: always
102119
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
111120
tmpfs:
112121
- /run
113122
- /tmp
114123
- /app/cache
124+
weblate-celery-notify:
125+
image: weblate/weblate
126+
depends_on:
127+
- cache
128+
- database
129+
- weblate-celery-beat
115130
volumes:
116131
- type: volume
117132
source: weblate-data
118133
target: /app/data
119134
volume:
120135
nocopy: true
136+
environment:
137+
WEBLATE_SERVICE: celery-notify
121138
env_file:
122139
- ./environment
123140
restart: always
124141
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
133142
tmpfs:
134143
- /run
135144
- /tmp
136145
- /app/cache
146+
weblate-celery-translate:
147+
image: weblate/weblate
148+
depends_on:
149+
- cache
150+
- database
151+
- weblate-celery-beat
137152
volumes:
138153
- type: volume
139154
source: weblate-data
140155
target: /app/data
141156
volume:
142157
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
151158
environment:
152159
WEBLATE_SERVICE: celery-translate
153-
database:
154-
image: postgres:17-alpine
155160
env_file:
156161
- ./environment
157-
volumes:
158-
- postgres-data:/var/lib/postgresql/data
159-
restart: always
160-
cache:
161-
image: redis:7-alpine
162162
restart: always
163163
read_only: true
164-
command: [redis-server, --save, '60', '1']
165-
volumes:
166-
- redis-data:/data
164+
tmpfs:
165+
- /run
166+
- /tmp
167+
- /app/cache
167168
volumes:
168169
weblate-data: {}
169170
postgres-data: {}

0 commit comments

Comments
 (0)