Skip to content

refac: optimize the docker compose with yaml anchors#649

Open
DaanSelen wants to merge 7 commits into
greenbone:mainfrom
DaanSelen:refac/docker-compose
Open

refac: optimize the docker compose with yaml anchors#649
DaanSelen wants to merge 7 commits into
greenbone:mainfrom
DaanSelen:refac/docker-compose

Conversation

@DaanSelen

@DaanSelen DaanSelen commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

What

I replaced all the individual references to KEEP_ALIVE and FEED_RELEASE point to yaml anchors so cascading changes is easily done.

Why

This would make sure that all components sync the same feed and that a mismatch is unlikely

References

No references.

Checklist

@DaanSelen DaanSelen requested a review from a team as a code owner July 10, 2026 07:38
@DaanSelen

Copy link
Copy Markdown
Contributor Author

Changelog entry must still be done

@greenbonebot greenbonebot enabled auto-merge (rebase) July 10, 2026 07:38
auto-merge was automatically disabled July 10, 2026 07:41

Head branch was pushed to by a user without write access

@greenbonebot greenbonebot enabled auto-merge (rebase) July 10, 2026 07:41
Comment thread src/_static/compose.yaml
x-feed: &feed
FEED_RELEASE: "25.0"

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.

Comment thread src/_static/compose.yaml
Comment on lines -194 to +185
chmod 644 /mnt/openvas.conf
chmod 644 /mnt/openvas_log.conf
touch /var/log/openvas/openvas.log
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
chmod 644 /mnt/openvas.conf /mnt/openvas_log.conf /var/log/openvas/openvas.log

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 these lines in this PR. I am not maintaining the scanner components so this needs to be approved by somebody else.

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.

I moved the exact code to below the openvas scanner component itself. There should not be any changes. And in terms of dependency it all depends on the configure container.

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.

Please don't change these lines in this PR. I am not maintaining the scanner components so this needs to be approved by somebody else.

Regarding the chmod part. Its just combining individual calls to chmod to a single call on all files. Since permissions are all the same.

Comment thread src/_static/compose.yaml Outdated
Comment thread src/_static/docker-compose.yml
auto-merge was automatically disabled July 10, 2026 07:48

Head branch was pushed to by a user without write access

@greenbonebot greenbonebot enabled auto-merge (rebase) July 10, 2026 07:49
auto-merge was automatically disabled July 10, 2026 07:51

Head branch was pushed to by a user without write access

@greenbonebot greenbonebot enabled auto-merge (rebase) July 10, 2026 07:51
auto-merge was automatically disabled July 10, 2026 07:59

Head branch was pushed to by a user without write access

@greenbonebot greenbonebot enabled auto-merge (rebase) July 10, 2026 08:00
@DaanSelen DaanSelen changed the title refac: remove symlink and optimize the docker compose with yaml anchors refac: optimize the docker compose with yaml anchors Jul 10, 2026
auto-merge was automatically disabled July 10, 2026 12:59

Head branch was pushed to by a user without write access

@greenbonebot greenbonebot enabled auto-merge (rebase) July 10, 2026 12:59
auto-merge was automatically disabled July 10, 2026 14:17

Head branch was pushed to by a user without write access

@greenbonebot greenbonebot enabled auto-merge (rebase) July 10, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants