You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently have no way of persisting the config.*.json files in /var/lib/ghost. The only volume we can mount is /var/lib/ghost/content. Upstream ghost has not implemented a custom config file location option, with either a command-line argument or environment variable.
What I propose is two (or three) different methods:
ENV and Symbolic link
Establish an environment variable, GHOST_CONFIG that optionally contains a path to a config file, e.g. /config/config.production.json
Symlink the file in the entrypoint.sh with ln -fs $GHOST_CONFIG /var/lib/ghost/GHOST_CONFIG
Volume and Symbolic link
a.
Create new volume at /config
Symlink /config/config.*.json to /var/lib/ghost/config.*.json
My favorite method would be 2a. This enables users of both docker compose and kubernetes to manage their config files. Docker compose can just mount another volume, and kubernetes users can make use of ConfigMaps and mount them in their own dedicated directory.
I would gladly submit a pull request, but i'm unsure if I should make edits to each version of ghost (1.0-1.5) or just the latest (1.5). All we'd have to do is add some code to the entrypoint.sh and an ENV + VOLUME clause to the Dockerfile.
The text was updated successfully, but these errors were encountered:
Hi,
We currently have no way of persisting the config.*.json files in /var/lib/ghost. The only volume we can mount is /var/lib/ghost/content. Upstream ghost has not implemented a custom config file location option, with either a command-line argument or environment variable.
What I propose is two (or three) different methods:
ENV and Symbolic link
GHOST_CONFIG
that optionally contains a path to a config file, e.g./config/config.production.json
ln -fs $GHOST_CONFIG /var/lib/ghost/GHOST_CONFIG
Volume and Symbolic link
a.
/config
/config/config.*.json
to/var/lib/ghost/config.*.json
ln -fs /config/config.*.json /var/lib/ghost/config.*.json
b.
/var/lib/ghost/content/config.*.json
to/var/lib/ghost/config.*.json
ln -fs /var/lib/ghost/content/config.*.json /var/lib/ghost/config.*.json
My favorite method would be 2a. This enables users of both docker compose and kubernetes to manage their config files. Docker compose can just mount another volume, and kubernetes users can make use of ConfigMaps and mount them in their own dedicated directory.
I would gladly submit a pull request, but i'm unsure if I should make edits to each version of ghost (1.0-1.5) or just the latest (1.5). All we'd have to do is add some code to the entrypoint.sh and an ENV + VOLUME clause to the Dockerfile.
The text was updated successfully, but these errors were encountered: