Feature: Ghost CLI - new install & upgrade process
See original GitHub issueGhost 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:
- Created 7 years ago
- Reactions:14
- Comments:15 (7 by maintainers)
Top GitHub Comments
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:
Weāve tried it one way, it didnāt work for us. Now weāre going to try something different š
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.
Will be awesome to have a best practice stack š