Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Cover image for How to run Ghost CMS + Docker + Digital Ocean
Rafael Corrêa Gomes
Rafael Corrêa Gomes

Posted on • Edited on • Originally published atblog.rafaelcg.com

     

How to run Ghost CMS + Docker + Digital Ocean

As a developer probably you heard before aboutGhost the #1 open-source headless Node.js CMS, I was planning to install it inDigital Ocean using a simple $5 Droplet using Docker instead of their 1-click to install.

I did researches and I didn't find some developer-friendly method to get it started. So why not create one?!
If you want a quick start you can access myGhost CMS + Docker Compose repository to check it out!

Motivation

What I most like, is theGhost's value proposition and what they want to achieve, the simplicity and well-designed panel and integrations motivated me to start too.
I wish more developers know the benefits to use it and to have the chance to test and use it in personal and professional projects as I did!

Advantages

I decided to create something that makes it easier to start to use in production and in your local environment. So I created a bash script to have these advantages:

☝️ 1 command to install

👨‍💻 Ready to production and local development

⚡ Performance Optimized

🔒 SSL auto-renewed

Stack

  • Ghost CMS (Last version)
  • MySQL 5.7
  • NGINX
  • Docker

Bash commands

CommandsDescription
./dc startStart your containers
./dc stopStop all containers
./dc updateGet Ghost updates and restart containers

Environments

Production

In production, you can run one command to install, specifying your domain as the last parameter.

curl-s https://raw.githubusercontent.com/clean-docker/ghost-cms/master/dc | bash-s setup mydomain.com
Enter fullscreen modeExit fullscreen mode

Development

To prepare your local environment you just need to have Docker and Docker Compose installed and run:

git clone https://github.com/clean-docker/ghost-cms.git ghostcdghost/devdocker-compose up-d
Enter fullscreen modeExit fullscreen mode

Creating the script

I started assuming that you just created your environment and is running the script that I created to install, this below is the step-by-step description:

Automatically

  1. Change the domain in the NGINX and Docker file.
  2. Update packages
  3. Install SSL
  4. Install Docker
  5. Install Docker Compose
  6. Prepare the Ghost folders
  7. Configure the cron
  8. Start the Docker containers
  9. Show the URL to access

🙂 Thank you!

I hope you liked and enjoyed this post, I created it to the developer community to be motivated to test it as I did, if you have feedbacks please report or provide pull-requests, and don't' forget to give a star.

Top comments(1)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss
CollapseExpand
 
officialrajdeepsingh profile image
Rajdeep Singh
Javascript || Python || AI || Biotechnology || Bioinformatic || Front-end Developer
  • Location
    India
  • Education
    B.SC in Botany, Chemistry, Biotechnology and M.SC in Biotechnology
  • Work
    Educator || Junior Front-end Developer
  • Joined

I download ghost docker image for development propose.
when i run
docker-compose up -d
Command in terminal i face a error. look like.
Error
Tell me which method to you solve this error.

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Writing about eCommerce development, Adobe Commerce, Shopify, automation, productivity, and developer career.
  • Location
    Montréal, QC - Canada
  • Work
    Director, Adobe Commerce & Shopify Practice at Valtech
  • Joined

More fromRafael Corrêa Gomes

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp