Key things that are unique in this repository that allows you to deploy Ghost: On your local machine, clone the dokku-ghost repository and cd into it: $ git clone $ cd dokku-ghost Here, we will be setting up the port and URL to access Ghost through: $ dokku -no-restart config:set blog \ url= \ server_host=0.0.0.0 \ server_port=5000 3. $ dokku config:get blog DATABASE_URL on the above, you will need to set the following: $ dokku config:set -no-restart blog \ database_connection_user=mariadb \ database_connection_password=abcdefg \ database_connection_host=dokku-mariadb-blog-database \ database_connection_database=blog-database Retrieve the login details through the DATABASE_URL environment variable. The following commands are done on the Dokku hostįirst up, we need to configure the database credentials. We will be configuring Ghost via environment variables as opposed to a config file. Now, we will need to disable checks as the checks will fail upon our first deployment due to the lack of database connection credentials $ dokku checks:disable blog 2. $ dokku create blog $ dokku domains:add blog $ dokku mariadb:create blog-db $ dokku mariadb:link blog-db blogĪt this point, Dokku might inform you that the blog app has not been deployed. In this guide, we will use “blog” for the app and “blog-db” for the database service. SSH into your Dokku host, then create a new app with accompanying database services and domain. (Optional) Let’s Encrypt plugin for easy HTTPS.A domain pointing to your dokku host IP address (assumed to be ).SSH access to the Dokku host (assumed to be of hostname dokku).The first few steps of this guide are same as that of my previous guide, which is in turn based on Berge Greg’s post on getting Ghost 1.x to run on Heroku This guide is here to get you deploying a production Ghost blog on Dokku, with persistent storage. While the guide works most of the way, there are some additional steps that needs to be done to get it running on npm. In my attempts to fix this, I explored switching from yarn to npm, which then led me to the official guide on Ghost’s developer page: Using Ghost as an npm module.īenefits of using this npm method over the full zip download method - Repository size: 248Kb vs 10.9Mb (excluding node_modules) - Ease of updates - Ease of migration Since writing the initial guide on getting Ghost to run on Dokku, I’ve run into various problems in updating both Ghost and Dokku, ensuring data integrity, and managing migrations.īilling method changes with a client required a server migration, which somehow caused Dokku v0.11 to choke on using the previously-written method, which was written while using Dokku v0.10.
0 Comments
Leave a Reply. |