Closed jerryaldrichiii closed 5 years ago
What kind of things to do you put to /bootstrap
, and how it interacts with ZNC writing its configs?
Sure, for me, I render the configs/znc.conf
and SSL cert there via a k8s Secret (ConfigMap) which renders and mounts as a read-only volume. Though, you could also mount a volume from the host machine there if you didn't want it to be overwritten/modified at runtime.
I think this is better done in a custom image with FROM znc
. And in Dockerfile you can either add the needed files directly, or modify startup-sequnce like you did here.
Generally, it's expected that ZNC can write its config when you modify it e.g. via webadmin. But here, /znc saveconfig
will claim success, but upon restart the settings will be reverted.
Good point! FWIW, that's what I essentially did for my project.
Think there is value in me adding a guard around the copy so it will only copy if /znc-data
is empty? Or, better to keep it lean and avoid this method entirely? Won't hurt my feelings either way 😄
Well, if this feature is not going upstream, use whatever suits your case better :)
Hehe, I meant if there was any value adding it to this PR 😉
I think you're right though. No need to add it here. Regardless, thanks for taking the time to review and give feedback.
This is useful for mounting read-only volumes (e.g. k8s ConfigMap/Secrets).
ZNC expects write access so this allows mounting a volume as read-only then copying the data to
/znc-data
at runtime.I tested this locally, but I am by no means an expert so this "feature" may be way off base. It helped me with my k8s project though :smile:.
Feel free to edit anything/everything and thank you for everything you've done so far.