Skip to content

Commit ccba6e2

Browse files
committed
Change: Keep the data containers alive
Keep the data container alive to only copy new data when a new container image is pulled. Otherwise the data is copied on every restart of a depending service.
1 parent b32db9c commit ccba6e2

File tree

2 files changed

+30
-11
lines changed

2 files changed

+30
-11
lines changed

src/_static/docker-compose-22.4.yml

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,46 +5,59 @@ services:
55
image: registry.community.greenbone.net/community/vulnerability-tests
66
environment:
77
FEED_RELEASE: "24.10"
8+
KEEP_ALIVE: 1
89
volumes:
910
- vt_data_vol:/mnt
1011

1112
notus-data:
1213
image: registry.community.greenbone.net/community/notus-data
14+
environment:
15+
KEEP_ALIVE: 1
1316
volumes:
1417
- notus_data_vol:/mnt
1518

1619
scap-data:
1720
image: registry.community.greenbone.net/community/scap-data
21+
environment:
22+
KEEP_ALIVE: 1
1823
volumes:
1924
- scap_data_vol:/mnt
2025

2126
cert-bund-data:
2227
image: registry.community.greenbone.net/community/cert-bund-data
28+
environment:
29+
KEEP_ALIVE: 1
2330
volumes:
2431
- cert_data_vol:/mnt
2532

2633
dfn-cert-data:
2734
image: registry.community.greenbone.net/community/dfn-cert-data
35+
environment:
36+
KEEP_ALIVE: 1
2837
volumes:
2938
- cert_data_vol:/mnt
3039
depends_on:
31-
- cert-bund-data
40+
cert-bund-data:
41+
condition: service_healthy
3242

3343
data-objects:
3444
image: registry.community.greenbone.net/community/data-objects
3545
environment:
3646
FEED_RELEASE: "24.10"
47+
KEEP_ALIVE: 1
3748
volumes:
3849
- data_objects_vol:/mnt
3950

4051
report-formats:
4152
image: registry.community.greenbone.net/community/report-formats
4253
environment:
4354
FEED_RELEASE: "24.10"
55+
KEEP_ALIVE: 1
4456
volumes:
4557
- data_objects_vol:/mnt
4658
depends_on:
47-
- data-objects
59+
data-objects:
60+
condition: service_healthy
4861

4962
gpg-data:
5063
image: registry.community.greenbone.net/community/gpg-data
@@ -81,15 +94,15 @@ services:
8194
pg-gvm:
8295
condition: service_started
8396
scap-data:
84-
condition: service_completed_successfully
97+
condition: service_healthy
8598
cert-bund-data:
86-
condition: service_completed_successfully
99+
condition: service_healthy
87100
dfn-cert-data:
88-
condition: service_completed_successfully
101+
condition: service_healthy
89102
data-objects:
90-
condition: service_completed_successfully
103+
condition: service_healthy
91104
report-formats:
92-
condition: service_completed_successfully
105+
condition: service_healthy
93106

94107
gsa:
95108
image: registry.community.greenbone.net/community/gsa:stable
@@ -99,7 +112,8 @@ services:
99112
volumes:
100113
- gvmd_socket_vol:/run/gvmd
101114
depends_on:
102-
- gvmd
115+
gvmd:
116+
condition: service_started
103117
# Sets log level of openvas to the set LOG_LEVEL within the env
104118
# and changes log output to /var/log/openvas instead /var/log/gvm
105119
# to reduce likelyhood of unwanted log interferences
@@ -155,7 +169,9 @@ services:
155169
# - 127.0.0.1:3000:80
156170
depends_on:
157171
vulnerability-tests:
158-
condition: service_completed_successfully
172+
condition: service_healthy
173+
notus-data:
174+
condition: service_healthy
159175
configure-openvas:
160176
condition: service_completed_successfully
161177
gpg-data:
@@ -199,10 +215,12 @@ services:
199215
condition: service_started
200216
gpg-data:
201217
condition: service_completed_successfully
202-
vulnerability-tests:
203-
condition: service_completed_successfully
204218
configure-openvas:
205219
condition: service_completed_successfully
220+
vulnerability-tests:
221+
condition: service_healthy
222+
notus-data:
223+
condition: service_healthy
206224

207225
gvm-tools:
208226
image: registry.community.greenbone.net/community/gvm-tools

src/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Calendar Versioning](https://calver.org).
1313
* Ensure cargo is up-to-date by running `rustup update stable` for openvasd
1414
* Include info to update the `docker-compose.yml` file before updating the
1515
Docker container
16+
* Keep data containers alive to restart them only if a new image is pulled
1617

1718
## 25.5.0 - 2025-05-30
1819

0 commit comments

Comments
 (0)