You could change the document root under advanced settings to a subdirectory of the app directory, for example “public”.
So you could put the app files to the new public directory and the config files to the app directory.
This way everything should be persistent and the config files (in the app directory) are not accessible from the internet.
As an alternative you could add another volume for your config directory as explained here but it’s not included in the backup.
