LoginSignup
0
2

More than 5 years have passed since last update.

VagrantでRocket.Chatを構築

Last updated at Posted at 2017-10-08

経緯

社内で使えるチャットツールを検証しようと思って、Rocket.Chatの公式にあるdocker-compose.ymlを元に起動したところ、windowsで動作できませんでした。(docker toolboxとwindows8.1では駄目だっただけです...)
githubを確認すると、ubuntu16.04だとコマンド一つでできそうなのでやってみました。

必要なもの

  • vagrant
  • virtualbox

検証

ubuntu16.04のboxが必要なので追加します。virtualboxを使うので、providersの指定を入れます。

$ vagrant box add ubuntu16.04 https://atlas.hashicorp.com/bento/boxes/ubuntu-16.04/versions/2.3.8/providers/virtualbox.box

Vagrantfileを編集します

Vagrantfile
Vagrant.configure("2") do |config|
  // boxの指定
  config.vm.box = "ubuntu16.04"

  // port:3000で確認できるようにします
  config.vm.network "forwarded_port", guest: 3000, host: 3000

  // 起動時に行うコマンド. 
  config.vm.provision "shell", inline: <<-SHELL
    snap install rocketchat-server
  SHELL
end

準備はこれだけです。後は以下のコマンドをVagrantfileのあるディレクトリで実行して、http://localhost:3000をブラウザで確認すればOKです。

$ vagrant up

まとめ

これだけで動作確認することができるので非常に簡単です。ubuntu16.04が動く環境であればなんでもいいわけですね。他にも色々方法があるので、興味がある方はRocket.Chatのgithubで確認してみてください。

0
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
0
2