Skip to content

Instantly share code, notes, and snippets.

@shrmnk
Created January 29, 2018 03:05
Show Gist options
  • Save shrmnk/ff471ce5e6deace73c6c687d86e3e325 to your computer and use it in GitHub Desktop.
Save shrmnk/ff471ce5e6deace73c6c687d86e3e325 to your computer and use it in GitHub Desktop.
Running Ghost on Dokku
dokku config:get blog DOKKU_PROXY_PORT_MAP
http:80:5000 https:443:5000
dokku create blog
dokku domains:add blog blog.me
dokku mariadb:create blog-db
dokku mariadb:link blog-db blog
dokku config:get blog DATABASE_URL
mysql://mariadb:abcdefg@dokku-mariadb-blog-db:3306/blog-db
dokku config:set — no-restart blog \
database__connection__user=mariadb \
database__connection__password=abcdefg \
database__connection__host=dokku-mariadb-blog-database \
database__connection__database=blog-database
dokku — no-restart config:set blog \
url=https://blog.me \
server__host=0.0.0.0 \
server__port=5000
unzip ~/Downloads/Ghost-1.7.1.zip -d ~/projects/my-blog
cd ~/projects/my-blog
git init
git add -A
git commit -m ‘Initialize repository’
git remote add dokku dokku@dokku:blog
$ git push dokku
dokku run blog knex-migrator init
dokku checks:enable blog
dokku config:set — no-restart blog [email protected]
dokku letsencrypt blog
sudo mkdir /var/lib/dokku/data/storage/blog
dokku storage:mount blog /var/lib/dokku/data/storage/blog:/app/content/images
dokku ps:restart blog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment