refac: optimize the docker compose with yaml anchors#649
Conversation
|
Changelog entry must still be done |
Head branch was pushed to by a user without write access
| x-feed: &feed | ||
| FEED_RELEASE: "25.0" | ||
|
|
||
| name: greenbone-ce |
There was a problem hiding this comment.
Please don't change the name it will break existing setups completely.
There was a problem hiding this comment.
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.
| 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Head branch was pushed to by a user without write access
Head branch was pushed to by a user without write access
Head branch was pushed to by a user without write access
Head branch was pushed to by a user without write access
Head branch was pushed to by a user without write access
What
I replaced all the individual references to
KEEP_ALIVEandFEED_RELEASEpoint 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