LoginSignup
7
1

More than 3 years have passed since last update.

Dolphinというシングルユーザー用のActivityPub serverを立ててみた

Last updated at Posted at 2019-11-16

activitypubというprotocolがあります。わかりやすく言うと、分散snsのprotocolです。このprotocolを使ったserverで有名なのはmastodonです。

今回、misskeyというmastodonに似たプロジェクトがあるのですが、その姉妹プロジェクトであるdolphinがシングルユーザー、つまり、お一人様インスタンスと呼ばれるサーバーに特化しているようなので、herokuで立ててみました。

$ git clone -b master git://github.com/syuilo/dolphin.git
$ cd dolphin
$ cp .config/example.yml .config/default.yml
$ npm i

$ heroku create $APP_NAME
$ ls -a ./.git
$ heroku git:remote -a $APP_NAME
# heroku buildpacks:set https://github.com/heroku/heroku-buildpack-nodejs
$ heroku addons:create heroku-postgresql:hobby-dev --version=10
$ heroku addons:create heroku-redis:hobby-dev
$ heroku config
# postgresql://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME}
# redis://h:${REDIS_PASS}@${REDIS_HOST}:${REDIS_PORT}
$ vim .config/default.yml
# postgresql, redisのurl情報を入れる
  disableCache: true
drive:
  storage: 'fs'
disableHsts: true
clusterLimit: 1
id: 'aid'

$ vim package.json
  "engines": {
    "node": "11.7.0",
    "npm": "6.13.0"
  }

$ vim Procfile
web: NODE_ENV=production npm run init && npm start

$ cat ~/.gitignore
$ git add .
$ git commit -m "first heroku" 
$ git push -u heroku master
$ heroku logs

# update
$ git pull
$ git push heroku master
$ heroku run npm run migrate

misskey_dolphin_heroku_01.png

7
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
1