LoginSignup
2
2

More than 5 years have passed since last update.

herokuに入れたSlack用のhubotの簡易運用手引き

Last updated at Posted at 2014-09-19

はじめに

herokuのアプリケーションのコラボレータ登録を依頼する

  • 追加は、herokuダッシュボード > アプリケショーン名 > Access > collaborator にて行う

herokuのサーバーのTZを設定しておく(クローンとか動かす為に)

heroku config:add TZ=Asia/Tokyo

herokuのアプリをcloneする

以下のコマンドで、アプリケーションをダウンロードする

$ git clone git@heroku.com:アプリケーション名.git -o heroku
$ cd アプリケーション名
$ ls 
Procfile
README.md
bin
external-scripts.json
hubot-scripts.json
package.json
scripts

hubotを進化させたい

  • cloneしたherokuのアプリケーションディレクトリに入って、スクリプトをごにょごにょする。そして、以下のコマンドを叩いてデプロイする。
  • npm install パッケージしたら、package.json の dependencies にパッケージを追記して、heroku にプッシュを忘れずに
$ git push heroku master
$ heroku ps:scale web=1

動作の確認

  • 単純に @slackbot: ping で pong してみる

追加したスクリプト

以下、redmine用の環境変数を追加

$ heroku config:add HUBOT_REDMINE_BASE_URL=http://a.redmineurl.com
$ heroku config:add HUBOT_REDMINE_TOKEN=***************************(your API access key)
2
2
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
2
2