diff --git a/src/_static/compose.yaml b/src/_static/compose.yaml index 712b693e..e028945c 100644 --- a/src/_static/compose.yaml +++ b/src/_static/compose.yaml @@ -66,13 +66,17 @@ services: redis-server: image: registry.community.greenbone.net/community/redis-server - restart: on-failure + deploy: + restart_policy: + condition: any volumes: - redis_socket_vol:/run/redis/ pg-gvm: image: registry.community.greenbone.net/community/pg-gvm:stable - restart: on-failure:10 + deploy: + restart_policy: + condition: any volumes: - psql_data_vol:/var/lib/postgresql - psql_socket_vol:/var/run/postgresql @@ -82,14 +86,18 @@ services: pg-gvm-migrator: image: registry.community.greenbone.net/community/pg-gvm-migrator:stable - restart: no + deploy: + restart_policy: + condition: none volumes: - psql_data_vol:/var/lib/postgresql - psql_socket_vol:/var/run/postgresql gvmd: image: registry.community.greenbone.net/community/gvmd:stable - restart: on-failure + deploy: + restart_policy: + condition: any volumes: - gvmd_data_vol:/var/lib/gvm - scap_data_vol:/var/lib/gvm/scap-data/ @@ -127,7 +135,9 @@ services: gsad: image: registry.community.greenbone.net/community/gsad:stable - restart: on-failure + deploy: + restart_policy: + condition: any environment: GSAD_ARGS: "--listen=0.0.0.0 --http-only --api-only -f" volumes: @@ -154,6 +164,9 @@ services: - nginx_config_vol:/etc/nginx/conf.d:ro - nginx_certificates_vol:/etc/nginx/certs:ro - gsa_data_vol:/usr/share/nginx/html:ro + deploy: + restart_policy: + condition: any depends_on: gvm-config: condition: service_completed_successfully @@ -184,7 +197,6 @@ services: # shows logs of openvas openvas: image: registry.community.greenbone.net/community/openvas-scanner:stable - restart: on-failure volumes: - openvas_data_vol:/etc/openvas - openvas_log_data_vol:/var/log/openvas @@ -200,7 +212,9 @@ services: openvasd: image: registry.community.greenbone.net/community/openvas-scanner:stable - restart: on-failure + deploy: + restart_policy: + condition: any environment: # `service_notus` is set to disable everything but notus, # if you want to utilize openvasd directly, remove `OPENVASD_MODE` @@ -231,7 +245,9 @@ services: ospd-openvas: image: registry.community.greenbone.net/community/ospd-openvas:stable - restart: on-failure + deploy: + restart_policy: + condition: any hostname: ospd-openvas.local cap_add: - NET_ADMIN # for capturing packages in promiscuous mode diff --git a/src/changelog.md b/src/changelog.md index 0fc429ab..701a515b 100644 --- a/src/changelog.md +++ b/src/changelog.md @@ -20,6 +20,7 @@ and this project adheres to [Calendar Versioning](https://calver.org). * Upgrade PostgreSQL to v16 for Ubuntu * Update gvm-libs to 22.31.1 * Update gvmd to 26.10.0 +* Use [`restart_policy`](https://docs.docker.com/reference/compose-file/deploy/#restart_policy) for container services ## 26.2.0 - 2026-02-24