Skip to content

Instantly share code, notes, and snippets.

@MorrisJobke
Last active October 30, 2021 18:28
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MorrisJobke/ede0c551f249b7a64e8ab38c01e8f2f8 to your computer and use it in GitHub Desktop.
Save MorrisJobke/ede0c551f249b7a64e8ab38c01e8f2f8 to your computer and use it in GitHub Desktop.
Deploy stuff on dokku
ssh dokku@example.org apps:create pad
ssh dokku@example.org mariadb:create pad
ssh dokku@example.org mariadb:import pad < ~/backup.sql
ssh dokku@example.org mariadb:link pad pad
ssh dokku@example.org config:set pad ETHERPAD_SETTINGS=settings.json
git clone git@github.com:bright-star/etherpad-lite-heroku
cd etherpad-lite-heroku
git remote add dokku dokku@example.org:pad
# adjust settings.json (set admin password)
git commit -sam 'add admin password'
git push dokku master
ssh dokku@example.org config:set --no-restart pad DOKKU_LETSENCRYPT_EMAIL=admin@example.org
ssh dokku@example.org letsencrypt pad
ssh dokku@example.org apps:create ghost
ssh dokku@example.org storage:mount ghost /var/lib/dokku/data/storage/ghost/data:/app/content/data
ssh dokku@example.org storage:mount ghost /var/lib/dokku/data/storage/ghost/images:/app/content/images
ssh dokku@example.org storage:mount ghost /var/lib/dokku/data/storage/ghost/themes/casper/post.hbs:/app/content/themes/casper/post.hbs
ssh dokku@example.org config:set --no-restart ghost MAILGUN_SMTP_LOGIN=abc@example.org
ssh dokku@example.org config:set --no-restart ghost MAILGUN_SMTP_PASSWORD=password
git clone git@github.com:cobyism/ghost-on-heroku
cd ghost-on-heroku
git remote add dokku dokku@example.org:ghost
# adjust config.js
git commit -sam 'update config.js'
git push dokku master
ssh dokku@example.org config:set --no-restart ghost DOKKU_LETSENCRYPT_EMAIL=admin@example.org
ssh dokku@example.org letsencrypt ghost
# on server
docker pull aknaebel/isso
docker tag aknaebel/isso:latest dokku/comments:latest
mkdir -p /var/lib/dokku/data/storage/comments/db
mkdir -p /var/lib/dokku/data/storage/comments/config
# place config file and db file (if available)
chown -R dokku:dokku /var/lib/dokku/data/storage/comments
ssh dokku@example.org apps:create comments
ssh dokku@example.org storage:mount comments /var/lib/dokku/data/storage/comments/db/:/opt/issodb
ssh dokku@example.org storage:mount comments /var/lib/dokku/data/storage/comments/config/isso.conf:/opt/isso/isso.conf
ssh dokku@example.org tags:deploy comments 0.10
ssh dokku@example.org proxy:ports-add comments http:80:8080
ssh dokku@example.org proxy:ports-remove comments http:8080:8080
ssh dokku@example.org config:set --no-restart comments DOKKU_LETSENCRYPT_EMAIL=admin@example.org
ssh dokku@example.org letsencrypt comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment