Describe your Issue
The current setup effectively requires several writable and persistent directories, both for writing configs via entrypoints as well as for managing nextcloud itself. Furthermore, by using the entrypoint dockerism, secret values are unnecessarily exposed to env (apps exposing env via debug endpoints is a favorite ;D ).
Furthermore, apps can be installed from within the application.
This makes deployment at scale a game of luck.
Limitations
Approach
I expect this to play out roughly like this and would try to keep it roughly updated to reflect reality as good as it is possible:
First iteration(s)
- mount
emptyDir to initContainer using same image as deployment at config path
- let entrypoint do its magic
- start main container with readOnlyRootFilesystem SecurityContext and command/arg skipping entrypoint and without persistence
- see what breaks [^1]
- fix it and try again :-)
Next step (possibly trivial)
- remove secrets from env
- see what breaks
- fix it and try again :-)
Further things
Related issues
Describe your Issue
The current setup effectively requires several writable and persistent directories, both for writing configs via entrypoints as well as for managing nextcloud itself. Furthermore, by using the entrypoint dockerism, secret values are unnecessarily exposed to env (apps exposing env via debug endpoints is a favorite ;D ).
Furthermore, apps can be installed from within the application.
This makes deployment at scale a game of luck.
Limitations
https://docs.nextcloud.com/server/25/admin_manual/configuration_server/config_sample_php_parameters.html#config-is-read-only
Approach
I expect this to play out roughly like this and would try to keep it roughly updated to reflect reality as good as it is possible:
First iteration(s)
emptyDirto initContainer using same image as deployment at config pathNext step (possibly trivial)
Further things
Related issues
/datasuffix #531