LoginSignup
1
1

More than 5 years have passed since last update.

DockerfileのCMDでforeverからのhubotを起動

Posted at

同様のことをしている資料だと動かないことが多々あったので記録しておきます。

Dockerfile
RUN npm install forever --save && npm install
CMD node_modules/forever/bin/forever -c coffee node_modules/.bin/hubot -a slack

forever -c で任意のunixコマンドを呼び出すことが出来ます。

bin/hubot はShellScriptでnode_modules/.bin/hubotを呼び出しています。
node_modules/.bin/hubot はCoffeeScriptです。
各ファイルの中身をちゃんと確認せずデーモン化しようとして嵌まりました。

1
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
1
1