Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 41 additions & 54 deletions src/_static/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,39 +1,43 @@
name: greenbone-community-edition
# YAML Anchors
x-keepalive: &keepalive
KEEP_ALIVE: 1
x-feed: &feed
FEED_RELEASE: "24.10"

name: greenbone-ce

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't change the name it will break existing setups completely.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we then stuck to remain using the same name? Or how would go about changing it. The current name is quite long in my opinion.

services:
vulnerability-tests:
image: registry.community.greenbone.net/community/vulnerability-tests
environment:
FEED_RELEASE: "24.10"
KEEP_ALIVE: 1
<<: [*feed, *keepalive]
volumes:
- vt_data_vol:/mnt

notus-data:
image: registry.community.greenbone.net/community/notus-data
environment:
KEEP_ALIVE: 1
<<: *keepalive
volumes:
- notus_data_vol:/mnt

scap-data:
image: registry.community.greenbone.net/community/scap-data
environment:
KEEP_ALIVE: 1
<<: *keepalive
volumes:
- scap_data_vol:/mnt

cert-bund-data:
image: registry.community.greenbone.net/community/cert-bund-data
environment:
KEEP_ALIVE: 1
<<: *keepalive
volumes:
- cert_data_vol:/mnt

dfn-cert-data:
image: registry.community.greenbone.net/community/dfn-cert-data
environment:
KEEP_ALIVE: 1
<<: *keepalive
volumes:
- cert_data_vol:/mnt
depends_on:
Expand All @@ -43,16 +47,14 @@ services:
data-objects:
image: registry.community.greenbone.net/community/data-objects
environment:
FEED_RELEASE: "24.10"
KEEP_ALIVE: 1
<<: [*feed, *keepalive]
volumes:
- data_objects_vol:/mnt

report-formats:
image: registry.community.greenbone.net/community/report-formats
environment:
FEED_RELEASE: "24.10"
KEEP_ALIVE: 1
<<: [*feed, *keepalive]
volumes:
- data_objects_vol:/mnt
depends_on:
Expand All @@ -66,17 +68,15 @@ services:

redis-server:
image: registry.community.greenbone.net/community/redis-server
deploy:
restart_policy:
condition: any
restart: unless-stopped
expose:
- 6379
volumes:
- redis_socket_vol:/run/redis/

pg-gvm:
image: registry.community.greenbone.net/community/pg-gvm:stable
deploy:
restart_policy:
condition: any
restart: unless-stopped
volumes:
- psql_data_vol:/var/lib/postgresql
- psql_socket_vol:/var/run/postgresql
Expand All @@ -86,18 +86,14 @@ services:

pg-gvm-migrator:
image: registry.community.greenbone.net/community/pg-gvm-migrator:stable
deploy:
restart_policy:
condition: none
restart: no
volumes:
- psql_data_vol:/var/lib/postgresql
- psql_socket_vol:/var/run/postgresql

gvmd:
image: registry.community.greenbone.net/community/gvmd:stable
deploy:
restart_policy:
condition: any
restart: unless-stopped
volumes:
- gvmd_data_vol:/var/lib/gvm
- scap_data_vol:/var/lib/gvm/scap-data/
Expand Down Expand Up @@ -126,7 +122,7 @@ services:
image: registry.community.greenbone.net/community/gsa:stable-slim
environment:
MOUNT_PATH: "/mnt/web"
KEEP_ALIVE: 1
<<: *keepalive
healthcheck:
test: [ "CMD-SHELL", "test -e /run/gsa/copying.done" ]
start_period: 5s
Expand All @@ -135,9 +131,7 @@ services:

gsad:
image: registry.community.greenbone.net/community/gsad:stable
deploy:
restart_policy:
condition: any
restart: unless-stopped
environment:
GSAD_HTTP_ONLY: "true"
GSAD_API_ONLY: "true"
Expand All @@ -159,16 +153,14 @@ services:

nginx:
image: registry.community.greenbone.net/community/nginx:latest
restart: unless-stopped
ports:
- 127.0.0.1:443:443
- 127.0.0.1:9392:9392
volumes:
- 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
Expand All @@ -191,32 +183,13 @@ services:
- |
printf "table_driven_lsc = yes\nopenvasd_server = http://openvasd:80\n" > /mnt/openvas.conf
sed "s/127/128/" /etc/openvas/openvas_log.conf | sed 's/gvm/openvas/' > /mnt/openvas_log.conf
chmod 644 /mnt/openvas.conf
chmod 644 /mnt/openvas_log.conf
touch /var/log/openvas/openvas.log
chmod 644 /mnt/openvas.conf /mnt/openvas_log.conf
chmod 666 /var/log/openvas/openvas.log

# shows logs of openvas
openvas:
image: registry.community.greenbone.net/community/openvas-scanner:stable
volumes:
- openvas_data_vol:/etc/openvas
- openvas_log_data_vol:/var/log/openvas
command:
- /bin/sh
- -c
- |
cat /etc/openvas/openvas.conf
tail -f /var/log/openvas/openvas.log
depends_on:
configure-openvas:
condition: service_completed_successfully

openvasd:
image: registry.community.greenbone.net/community/openvas-scanner:stable
deploy:
restart_policy:
condition: any
restart: unless-stopped
environment:
# `service_notus` is set to disable everything but notus,
# if you want to utilize openvasd directly, remove `OPENVASD_MODE`
Expand Down Expand Up @@ -245,11 +218,25 @@ services:
aliases:
- openvasd

# shows logs of openvas
openvas:
image: registry.community.greenbone.net/community/openvas-scanner:stable
volumes:
- openvas_data_vol:/etc/openvas
- openvas_log_data_vol:/var/log/openvas
command:
- /bin/sh
- -c
- |
cat /etc/openvas/openvas.conf
tail -f /var/log/openvas/openvas.log
depends_on:
configure-openvas:
condition: service_completed_successfully

ospd-openvas:
image: registry.community.greenbone.net/community/ospd-openvas:stable
deploy:
restart_policy:
condition: any
restart: unless-stopped
hostname: ospd-openvas.local
cap_add:
- NET_ADMIN # for capturing packages in promiscuous mode
Expand Down
1 change: 1 addition & 0 deletions src/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ and this project adheres to [Calendar Versioning](https://calver.org).
* Use [`restart_policy`](https://docs.docker.com/reference/compose-file/deploy/#restart_policy) for container services
* Use `compose.yaml` instead of `docker-compose.yml` everywhere in the docs
* Use environment variables for the settings of gsad
* Refactored the Docker compose to use yaml anchors

## 26.2.0 - 2026-02-24

Expand Down