7c6f96d6ba | ||
---|---|---|
Dockerfile | ||
README.md | ||
config.ini |
README.md
WriteFreely + Dokku
Pre-requisites
- You must have Dokku installed on your server already for these steps to work.
- You must download the files contained in this repo (
Dockerfile
andconfig.ini
) and have them in a folder on your local computer. - You must edit the config.ini you downloaded to match the settings you'd like.
Installation
First, connect to your server via SSH and create the writefreely
app.
dokku apps:create writefreely
Then, setup the directories for WriteFreely's data so it won't be wiped each time you re-deploy.
mkdir -p /var/lib/dokku/data/storage/writefreely/{db,keys}
chown daemon:daemon /var/lib/dokku/data/storage/writefreely/*
dokku storage:mount writefreely /var/lib/dokku/data/storage/writefreely/keys:/go/keys
dokku storage:mount writefreely /var/lib/dokku/data/storage/writefreely/db:/go/db
dokku proxy:ports-set writefreely http:80:8080
Next, open the folder the files you downloaded from this repo are in. Initialize a git repo in it.
git init
git add --all
git commit -m "Init"
git remote add dokku dokku@[YOUR SERVER'S IP OR URL]:writefreely
git push dokku master
This deploy will fail. You can then initialize WriteFreely's database and keys.
dokku run writefreely bin/writefreely --init-db
dokku run writefreely bin/writefreely --gen-keys
Finally, you can rebuild the app and it'll run as expected.
dokku ps:rebuild writefreely