Last active
August 29, 2015 14:27
-
-
Save dcode/7284878ca0a0b6ff1c88 to your computer and use it in GitHub Desktop.
Let's Chat on EL7. Uses upstream binaries of Node.js. I'd like to get the EPEL packages to work, but haven't gotten that yet.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # vi: set ft=ruby : | |
| # Lets Chat Vagrantfile for EL7 | |
| # Set LCB_BRANCH to pick what git checkout to use when spinning up the | |
| # application. For example: | |
| # | |
| # $ LCB_BRANCH="feature-branch" vagrant up. | |
| # | |
| LCB_BRANCH = ENV['LCB_BRANCH'] || 'master' | |
| # Script that we run to bootstrap the system to run Let's Chat | |
| LCB_SCRIPT = <<EOF | |
| sudo yum install -y epel-release | |
| sudo yum install -y mongodb mongodb-server git libicu-devel @development | |
| sudo service mongod start | |
| # Install upstream node.js | |
| curl https://nodejs.org/dist/v0.12.7/node-v0.12.7-linux-x64.tar.gz | sudo tar xzvf - -C /opt | |
| sudo ln -s /opt/node-v*/bin/* /usr/local/bin/ | |
| # Clone repo and install dependencies | |
| git clone https://github.com/sdelements/lets-chat.git | |
| cd lets-chat | |
| git checkout #{LCB_BRANCH} | |
| npm install | |
| cp settings.yml.sample settings.yml | |
| LCB_HTTP_HOST=0.0.0.0 npm start | |
| EOF | |
| Vagrant.configure(2) do |config| | |
| config.vm.box = "opscode/centos-7.1" | |
| config.vm.box_url = "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-7.1_chef-provisionerless.box" | |
| config.ssh.forward_agent = true | |
| config.vm.provider "virtualbox" do |v| | |
| v.name = "Lets Chat" | |
| #v.gui = true | |
| v.memory = 1024 | |
| end | |
| config.vm.define :lcb do |lcb| | |
| lcb.vm.network "forwarded_port", guest: 5000, host: 5000 | |
| lcb.vm.network "forwarded_port", guest: 5222, host: 5222 | |
| lcb.vm.provision :shell, :inline => LCB_SCRIPT, :privileged => false | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment