Hi, im using ghost via docker but i can’t edit the .hbs file to add an comment cusdis box beacuse the symlink is broken.
The casper theme folder appears like this:
Can anyone help me? In my docker-compose.yml i have the content directory like this
environment:
database__client: sqlite3
database__connection__filename: "/var/lib/ghost/content/data/ghost.db"
The volume:
volumes:
- ./content:/var/lib/ghost/content
I have not been following how Ghost has been changing over the years. There are 2 ways to address this in my mind:
Option 1
-
Mount another volume, versions
, where the theme files live, since, current
in /var/lib/ghost/current
is a symbolic link to the versioned directory in /var/lib/ghost/versions/x.y.z
.
-
This, of course, assumes that you back up the content versions directory in the container using something like:
cd directory-where-you-store-content
docker exec ghost_tn tar cf - versions | sudo tar xf -
The above will create versions
in the same directory where content
lives.
Then you add versions to your volume mount and call it a day.
- ./versions:/var/lib/ghost/versions
Option 2
I suppose you could just volume mount /var/lib/ghost
and call it a day. I seem to recall that there were filesystem overlay issues which made that a problem. I think you can’t mount config.production.json
on a mounted volume. Not to mention getting a clean version of the filesystem. So YMMV.
You might want to investigate Bitnami Ghost image. It seems to be a bit better documented, but it has a different approach to where things live.
1 Like
Thanks, i just change to new casper theme and its works perfectly.