Hi there,
I am using dokku (like a selfhosted heroku). That means I can git push my kirby folder to my server and its automatically updated. However dokku doesnt initialize the project with git so its not possible to commit changes of the Content folder on the server.
So at the moment I have the problem that if i push changes from local to server all changes done on the server are overwritten. The solution I see for now is to remove the content folder from git but then I’d have no option to sync my local development with the server.
Do you have an idea? Somebody using heroku/dokku and having same problem or a solution?
Best regards
Marc
I’m not familiar with Dokku, have you tried the Auto Git plugin? It automatically commits any changes made to content via Kirby’s panel.
It can even be used to deploy your site, bùt I guess Dokku already takes care of that.
Yes I tried it but that doesn’t work cause the project is not a git repo on my server.
Maybe you could use rsync to keep the content folders in sync?
1 Like
I guess Dokku doesn’t initialise Git because it uses symlink to deploy with zero downtime. Does it offer any persistent storage solution?
Or maybe you could use the panel on a staging server and block it in production. That way the Dokku instance would be read only.
thx @pedroborges “persistent storage” was the keyword I didnt know! I got it working and will write an article about using kirby with dokku in next days, cause there were some more things to consider. Will let you know
2 Likes
@mmintel I’m experiencing similar issues as you describe when using Dokku + Kirby. I’m using Dokku Persistent Storage to prevent overwriting the accounts
and content
folder on deploy.
$ dokku storage:list app-name
output:
app-name volume bind-mounts:
/var/lib/dokku/data/storage/app-name/accounts:/app/site/accounts
/var/lib/dokku/data/storage/app-name/content:/app/content
This is great, but i’d like my content to be stored in the git repo or synced with my local copy of the project. Had no success with Kirby-AutoGit so far. Do you have a link to your article?
I use a bash script for this. Wouldnt take much to make it sync content in the other direction
Kirby + AutoGit on Dokku does seem to work!
See https://github.com/pedroborges/kirby-autogit/issues/19
Instructions: