LoginSignup
7

More than 5 years have passed since last update.

チャットアプリを試してみた

Posted at

zulip

vagrantをインストールする。

$ sudo aptitude install lxc lxc-templates cgroup-lite redir
$ wget https://releases.hashicorp.com/vagrant/1.8.0/vagrant_1.8.0_x86_64.deb
$ sudo dpkg -i vagrant_1.8.0_x86_64.deb
$ sudo vagrant plugin install vagrant-lxc

zulipのコンテナを起動する。

$ git clone https://github.com/zulip/zulip.git
$ cd zulip
$ vagrant up

SSHのポート転送を指定して、zulipのコンテナに接続する。

$ vagrant ssh -- -L0.0.0.0:9991:localhost:9991

コンテナのタイムゾーンを日本時間に変更する。

$ sudo dpkg-reconfigure tzdata
  ⇒Asia/Tokyoに変更する
$ cd /srv/zulip
$ source /srv/zulip-venv/bin/activate
$ ./tools/run-dev.py --interface=''
System check identified no issues (0 silenced).
December 22, 2015 - 18:09:58
Django version 1.8, using settings 'zproject.settings'
Starting development server at http://localhost:9992/
Quit the server with CONTROL-C.

mattermost

$ docker run --name mattermost-dev -d --publish 8065:80 mattermost/platform

lets-chat

docker使用

$ docker run --name some-mongo -d docker.io/mongo
$ docker run --name some-letschat --link some-mongo:mongo -p 9080:8080 -d sdelements/lets-chat

ローカルインストール

$ sudo aptitude install npm mongodb
$ git clone https://github.com/sdelements/lets-chat.git
$ cd lets-chat
$ npm install
$ cp settings.yml.sample settings.yml
$ vi settings.yml
--- settings.yml.sample 2015-12-23 10:10:15.317877684 +0900
+++ settings.yml        2015-12-23 17:10:36.045070796 +0900
@@ -8,7 +8,7 @@

 http:
   enable: true
-  host: 'localhost'
+  host: '0.0.0.0'
   port: 5000

 https:
@@ -38,3 +38,6 @@
   providers: [local]
   local:
     enableRegistration: true
+
+i18n:
+  locale: ja
$ npm start

vagrant使用(失敗)

$ git clone https://github.com/sdelements/lets-chat.git
$ cd lets-chat
$ vagrant up
Bringing machine 'lcb' up with 'lxc' provider...
==> lcb: Box 'precise32' could not be found. Attempting to find and install...
    lcb: Box Provider: lxc
    lcb: Box Version: >= 0
==> lcb: Box file was not detected as metadata. Adding it directly...
==> lcb: Adding box 'precise32' (v0) for provider: lxc
    lcb: Downloading: http://files.vagrantup.com/precise32.box
The box you attempted to add doesn't match the provider you specified.

Provider expected: lxc
Provider of box: virtualbox

Vagrantfileを修正してやり直し。

--- a/Vagrantfile
+++ b/Vagrantfile
@@ -27,8 +27,9 @@ EOF
 VAGRANTFILE_API_VERSION = "2"

 Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
-  config.vm.box = "precise32"
-  config.vm.box_url = "http://files.vagrantup.com/precise32.box"
+  #config.vm.box = "precise32"
+  #config.vm.box_url = "http://files.vagrantup.com/precise32.box"
+  config.vm.box = "fgrehm/trusty64-lxc"

   config.vm.define :lcb do |lcb|
       lcb.vm.network "forwarded_port", guest: 5000, host: 5000
$ vagrant up

起動出来たけど接続できなかった。

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