silikonhell.blogg.se

Ghostnote dokara
Ghostnote dokara





  1. #Ghostnote dokara how to#
  2. #Ghostnote dokara code#

This should be enough for your blog to be running. Since this domain is not known by the Nginx server operated by Dokku we need to add it through the Dokku command-line: $ dokku domains:add my-ghost-app Now configure one of Ghost's environment variables to instruct it for which Host it can receive traffic: $ dokku config:set my-ghost-app url= $ mkdir -p /opt/my-ghost-app/ghost/content $ dokku storage:mount my-ghost-app /opt/my-ghost-app/ghost/content:/var/lib/ghost/contentĪnd create the directory. Since Docker containers are ephemeral and do not persist across restarts we should mount a storage volume to make sure we do not lose any content when that happens. This command tells Dokku to route all incoming traffic on port 80 to port 2368 inside our Ghost Docker container.

ghostnote dokara

But before we can reach our Ghost application from the outside world we need to expose it's port: $ dokku proxy:ports-add my-ghost-app http:80:2368 We should now have a docker container that is running Ghost (you can check by issuing the command docker ps). Now that we have tagged the Docker image we can deploy it: dokku tags:deploy my-ghost-app latest So let's tag our Docker image with the correct name: $ docker tag ghost:latest dokku/my-ghost-app:latest Once you have an application setup you can pull in the latest Ghost docker image $ docker pull ghost:latestįor Dokku to recognize a docker image from your local repository it should be name dokku/name-of-app:tag. Start by creating a new Dokku application $ dokku apps:create my-ghost-app This guide is tested against Dokku v0.14.6 Prerequisites: I assume you have a server running Dokku, if you don't it is quite easy to spin one up on Digitalocean.

#Ghostnote dokara code#

Directly deploying a Docker image gives us the advantage of not having to create a custom code repository for our Ghost deployment, saving us time spent on maintenance. Since Dokku is based on git-ops there is no clear way to deploy Ghost to a Dokku environment.įortunately Dokku allows you to directly deploy Docker images directly, be it a bit of an obscure feature, it works remarkably well. The main difference between my Wordpress setup and Ghost, is that there is no code repository managed by Git for my Ghost setup.

#Ghostnote dokara how to#

This made me figure out how to deploy a Ghost application to Dokku.

ghostnote dokara

When I decided to switch my personal site to Ghost I wasn't willing to sacrifice my Dokku setup. This had been working smoothly for my previous personal blog which was a Wordpress app. The experience is very similar to deploying to other git-ops platforms like Heroku. Dokku allows you to deploy your projects through git-ops.

ghostnote dokara

I have been using Dokku for years to host personal sites and pet projects on a cheap web-server.







Ghostnote dokara