Hi guys, I’m working on a custom kirby build for my portfolio site.
My current install works as follows:
Hosted on Digital Ocean Ubuntu LAMP Stack Droplet, I have also configured dropbox to sync with my local machine so I can easily edit and update content.
I deploy site updates (other than content) using deploybot, and how this works is, deploy pushes every new build to a /var/html/releases folder and appends a release number to the end of the folder name for each build and then symbolic links the latest build to /var/www/current
I’ve updated my apache2 config to point to /var/www/current but as deploy creates a new folder for the site each time it’s deployed I have to keep the content folder outside of this if I wish to manage my content via dropbox.
I’ve managed to move my content folder out to /var/www/content and this is successfully syncing with dropbox.
I configured this by creating a site.php in the root of the site /var/www/current this file will get placed by deploybot at the end of each deployment so as not to break my local install.
My site loads fine, displays all my content and updates via dropbox however my images won’t load. This is where I’m out of ideas. I’ve enough linux experience to have got me to this point but I’m not that experienced in PHP so I’ve likely butchered my site.php file to see my files but incorrectly. Any help would be great guys. I’m happy to write my process up in detail to help other users achieve a similar install if interested.
Kirby Docs - Custom folder Locations
My custom site.php
<?php
// Stored on the servers as site.php to override the default kirby content folder
$kirby = kirby();
// configuration goes here
// changing the directory
$kirby->roots->content = '/var/www/content';
// changing the url
$kirby->urls->content = $kirby->urls()->index() . '/content';
?>