
Ghost is an open-source publishing platform built with Node.js designed to make blogging simple. Ghost also provides a flexible frontend ready to use for your blog.
In this guide, you will learn how to deploy Ghost using the official Docker image and MySQL on Northflank.
-
Create a new MySQL database in a new project on Northflank. For increased security, we recommend keeping SSL enabled and External Access disabled. You can start with the smallest compute plan with 4 GB of storage and one replica.
-
Create a new deployment service deploying from an external image. Set the image path to
ghost:latest
. Port 2368 will be automatically detected and exposed. Once created, copy the service URL or optionally link a custom domain. -
Create a new secret group which will store the environment variables. We will manually add key value secrets and link the MySQL database we created earlier.
-
Manual Secrets
Key Value url
The unique service code.run deployment URL or a linked custom domain (prefixed with https://
)database__client
mysql
database__connection__ssl
{}
-
Inherited connection details from the database
Variable name Alias host
database__connection__host
username
database__connection__user
password
database__connection__password
database
database__connection__database
-
Inheriting environment variables ensures that the database connection details are automatically injected in the environment, avoiding the need to manually copy and paste them.
-
-
-
Go back to your service and rollout a restart. A new container will initiate the database and set everything up. Once finished, you can open the service URL followed by
/ghost
to create your first administrator. -
Optionally, navigate to Volumes and add new volume to persist your media uploads across container restarts. Choose the name, storage and set container mount path to
/var/lib/ghost/content
. Saving the volume will rollout a restart and your Ghost deployment will be ready when the container boots up.-
Volume storage cannot be scaled down once created. Start with the lowest one you need for your media uploads.
-
Northflank allows you to deploy your code and databases within minutes. Sign up for a Northflank account and create a free project to get started.
- Multiple read and write replicas
- Observe & monitor with real-time metrics & logs
- Low latency and high performance
- Backup, restore and fork databases
- Private and optional public load balancing as well as Northflank local proxy