Skip to content

bleucobalt/ghost-on-heroku

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Déployer Ghost sur Heroku

Ghost est un projet libre, une plateforme simple de blogging. Visitez le projet à l'adresse http://ghost.org, ou lisez la documentation sur http://support.ghost.org.

Heroku est un hébergeur libre multiplateforme, performant, et gratuit. La plateforme Ghost utilise le système node.js, réputé comme l'un des plus performant actuellement, et c'est pourquoi on ne peut pas héberger Ghost n'importe où.

La limitation connue de l'hébergement gratuit sur Heroku est la suivante : Le système n'est pas opérationnel 1 heure par 24 heures.

Déployer le blog sur Heroku

Pour déployer le blog sur Heroku, veillez tout d'abord à créer un compte sur Heroku, en choisissant le language de programmation "node.js"

signup

Restez connecté à votre compte fraîchement créé, puis grâce à un nouvel onglet de votre navigateur, cliquez sur le bouton ci-dessous :

Deploy

Après quelques secondes, votre blog est déployé (avec le paramètres par défaut et en anglais de Ghost).

Les choses à savoir

  • Après le déployment de votre application, visitez la page d'administration du blog YOURAPPNAME.herokuapp.com/ghost pour configurer le blog.

  • Votre blog sera publié et accessible à l'adresse YOURAPPNAME.herokuapp.com.

  • To make changes to your Ghost blog (like adding a theme to the /content directory, for instance), clone your blog locally using the Heroku Toolbelt:

    heroku git:clone --app YOURAPPNAME

What do I put in the deployment and environment variable fields?

  • App name (required). Pick a name for your application. Heroku says this field is optional, but it’s easier if you choose a name here, because you need to specify the URL of your blog in the first config field anyway. You can add a custom domain later if you want, but this is the name of the application you’ll see in your Heroku dashboard.

  • Heroku URL (required). Take the name of your Heroku application, and put it into URL form. For example, if you choose my-ghost-blog as the app name, the Heroku URL config value needs to be http://my-ghost-blog.herokuapp.com (no trailing slash). If you subsequently set up a custom domain for your blog, you’ll need to update your Ghost blog’s HEROKU_URL environment variable accordingly.

Using with file uploads disabled

Heroku app filesystems aren’t meant for permanent storage, so file uploads are disabled by default when using this repository to deploy a Ghost blog to Heroku. If you’re using Ghost on Heroku with S3 file uploads disabled, you should leave all environment variables beginning with S3_… blank.

Configuring S3 file uploads

To configure S3 file storage, create an S3 bucket on Amazon AWS, and then specify the following details as environment variables on the Heroku deployment page (or add these environment variables to your app after deployment via the Heroku dashboard):

  • S3_ACCESS_KEY_ID and S3_ACCESS_SECRET_KEY: Required if using S3 uploads. These fields are the AWS key/secret pair needed to authenticate with Amazon S3. You must have granted this keypair sufficient permissions on the S3 bucket in question in order for S3 uploads to work.

  • S3_BUCKET_NAME: Required if using S3 uploads. This is the name you gave to your S3 bucket.

  • S3_BUCKET_REGION: Required if using S3 uploads. Specify the region the bucket has been created in, using slug format (e.g. us-east-1, eu-west-1). A full list of S3 regions is available here.

  • S3_ASSET_HOST: Optional, even if using S3 uploads. Use this variable to specify the S3 bucket URL in virtual host style, path style or using a custom domain. See this page for details.

Once your app is up and running with these variables in place, you should be able to upload images via the Ghost interface and they’ll be stored in Amazon S3. ✨

How this works

This repository is essentially a minimal web application that specifies Ghost as a dependency, and makes a deploy button available.

Updating

After deploying your own Ghost blog, you can update it by running the following commands:

heroku git:clone --app YOURAPPNAME && cd YOURAPPNAME
git remote add origin https://github.com/cobyism/ghost-on-heroku
git pull origin master # may trigger a few merge conflicts, depending on how long since last update
git push heroku master

This will pull down the code that was deployed to Heroku so you have it locally, attach this repository as a new remote, attempt to pull down the latest version and merge it in, and then push that change back to your Heroku app instance.

Problems?

If you have problems using your instance of Ghost, you should check the official documentation or open an issue on the official issue tracker. If you discover an issue with the deployment process provided by this repository, then open an issue here.

License

Released under the MIT license, just like the Ghost project itself.

About

One-button Heroku deploy for the Ghost blogging platform.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%