question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if youā€™re still stuck at the end, weā€™re happy to hop on a call to see how we can help out.

Feature: Ghost CLI - new install & upgrade process

See original GitHub issue

Ghost is currently really quite hard to install, and a pain to upgrade šŸ˜­

There is no standardised process for installing, with users installing it on different platforms and in different scenarios. Supporting all of these custom installations is time-consuming, and due to the varying environments, the error messages can be widely different (this is also a result of NPMā€™s widely varied error handling).

Updating Ghost is at the moment a similarly varied process. A common feature request is for automatic updates, however due to the complexities of a continuously running process in Node, installation errors, and other such issues, this is at the very least incredibly difficult and at most impossible šŸš«

To reduce the number of installation & upgrade issues that occur, and to enable implementation of automatic updates, it is necessary to develop a standard for installing, running and upgrading Ghost.


Considerations for a standardised install:

  • As there are so many environments that people choose to run Ghost in, it is going to be impossible to cover everyoneā€™s use case with one install tool.
  • Instead, we should provide one, single, optimised, recommended environment in which Ghost runs well & is easy to setup & maintain.
  • Deviations and flexibility should be possible, but require the knowledge needed to successfully run & maintain Ghost outside of the recommended setup.

The recommended environment will be something along the lines of:

Ubuntu LTS + nginx + systemd + MySQL + Node.js v4 + SSL (+ Varnish?)


Ghost CLI Overview

https://github.com/TryGhost/Ghost-CLI

Ghost CLI is our shiny new tool for providing a standardised install & upgrade process šŸŽ‰.

The new process for installing Ghost in a production environment will be:

  • npm install -g ghost-cli
  • ghost install

(It already works, give it a go!)

The installer will use various sub commands to check the environment is compatible (ghost doctor) and for setting up configuration (ghost config). There will also be ghost start and ghost stop commands. The installer will be interactive (with prompts) for all required information such as your blog URL, meanwhile Any configuration options which deviate from the standard install (such as switching databases) will be provided via command line flags.

The install process will default to production mode, and so will include requesting & configuring your blog URL. Weā€™ll also be working towards adding as much tooling around helping to configure nginx, systemd, setup ssh and so on as is possible.

Weā€™ll be adding one special install command ghost install local, which will do a quick-install using sqlite3 and assume no url etc is needed. Thisā€™ll be a useful tool for theme and app developers to quickly get a development environment setup.

Upgrading Ghost will be a single command: ghost update. Long term we aim to turn this into a single click, and eventually an automatic process.

Bonus: By providing a CLI tool, we are also able to offload some of the burden of configuration management, environment checks, migrations etc which is currently in Ghost core, allowing us to streamline the startup time for Ghost (important for automatic updates šŸ˜‰).


This issue provides just a high-level overview of the new cli tools. For more details, keep an eye on the issues over on the Ghost-CLI repo: https://github.com/TryGhost/Ghost-CLI/issues.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:14
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

5reactions
ErisDScommented, Sep 30, 2016

it should easily be platform agnostic

Thatā€™s a really flippant statement. Weā€™ve been trying to be platform agnostic for 3 years. It is not easy, thatā€™s why this issue exists:

There is no standardised process for installing, with users installing it on different platforms and in different scenarios. Supporting all of these custom installations is time-consuming, and due to the varying environments, the error messages can be widely different (this is also a result of NPMā€™s widely varied error handling).

Weā€™ve tried it one way, it didnā€™t work for us. Now weā€™re going to try something different šŸ˜‰

Wouldnā€™t the standard ā€œOfficialā€ supported install introduce added redundancy which will make configuration for other environments difficult?

Thatā€™s kind of the point. We want everyone to install it the same way to reduce our support overhead. This is so that we can spend our time on adding useful new features instead of triaging issues on various platforms.

2reactions
pascalandycommented, Oct 3, 2016

Ubuntu LTS + nginx + systemd + MySQL + Node.js v4 + SSL (+ Varnish?)

Will be awesome to have a best practice stack šŸ˜ƒ

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ghost-CLI - A fully loaded tool for installation and configuration
The best way to install, manage, and update your site locally or when self-hosting Ghost. A full guide for our advanced CLI tool....
Read more >
Update the Ghost CLI - Bitnami Documentation
Some operations such as upgrading Ghost require updating the Ghost CLI. To update the Ghost CLI follow these steps, depending on your installation...
Read more >
How to Install Ghost-CLI on DigitalOcean
Here's the Complete Guide to Install Ghost-CLI on DigitalOcean and Steps to Install Ghost CMS Via Ghost-CLI with Free SSL & HTTP/2 Support....
Read more >
Self-Hosted Ghost: How to Upgrade Ghost v4.x - Read The Docs
Now, after you upgrade Ghost-CLI to the lastest version, you need to update every site to the latest minor version before upgrading to...
Read more >
Updating Ghost (on DigitalOcean) - techfirth
Switch user to the ghost-mgr account. Digital Ocean installs ghost using a local service account on your server. You need to run the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found