Previously I have created a blog with dokku and I wanted to create some application with database.
This is a guide on setup your own Stringer
rss reader with dokku
.
Dokku Host configuration
Create App
Create the app the normal way
1 | dokku apps:create rss |
Stringer
will use postgresql, install the plugin and create database
1 | sudo dokku plugin:install https://github.com/dokku/dokku-postgres.git |
You need to link the app and database together
1 | dokku postgres:link rss-database rss |
Setup swap
For dokku
to build Stringer
image, you need more ram and swap space.
In my case, I created a 8G swapfile for it to build properly.
1 | sudo fallocate -l 8G /swapfile |
Client-side configuration
Clone Repository
1 | git clone git://github.com/swanson/stringer.git |
Update Configuration files
I have tried to add environment variable in dokku, it will alway fail with
invalid argument: -p $PORT
while deploy.
Edit Procfile
, replace $PORT
to 8080
The content should be like this
1 | web: bundle exec unicorn -p 8080 -c ./config/unicorn.rb |
Deploy to dokku
Push to dokku (Client-side)
1 | git remote add dokku dokku@example.com:rss |
If it failed to deploy, go to remote host and run this command
1 | dokku config:set rss CURL_TIMEOUT=600 |
After deploy (Host)
1 | dokku config:set rss APP_URL="rss.example.com" |
Let’s encrypt (Host)
1 | dokku config:set --no-restart rss DOKKU_LETSENCRYPT_EMAIL=user@example.com |
Auto Refresh (Host)
Add this in your dokku host crontab -e
1 | @hourly dokku --quiet --rm run rss bundle exec rake fetch_feeds |
Fever API
Stringer
include fever api, if your reader support this (Reeder
/ Unread
), you can sync with the following info:
In this example, I use https://rss.example.com
as your rss application url.
Fields | Input | |
---|---|---|
Server | https://rss.example.com/fever |
|
stringer | ||
Password | yourpassword |