mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-28 00:06:53 +01:00
added docker container and vagrant
This commit is contained in:
parent
1fb1b4e085
commit
dc1b235df9
2
.gitignore
vendored
2
.gitignore
vendored
@ -30,3 +30,5 @@ unleash-server.tar.gz
|
||||
|
||||
# idea stuff:
|
||||
*.iml
|
||||
|
||||
.vagrant/
|
||||
|
@ -1,11 +1,14 @@
|
||||
FROM mhart/alpine-node:0.10.38
|
||||
FROM nodesource/trusty:0.12
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN curl -sL http://cldup.com/XPw5-FrHJz.gz | \
|
||||
gunzip -c | tar -x -C /tmp/ && \
|
||||
mv /tmp/envconsul_0.5.0_linux_amd64/envconsul /usr/bin/
|
||||
|
||||
RUN npm install --production && \
|
||||
npm run build
|
||||
|
||||
EXPOSE 4242
|
||||
ENTRYPOINT ["npm"]
|
||||
|
||||
CMD ["start"]
|
||||
CMD envconsul -consul $(route -n | awk '/UG/ {print $2}'):8500 -prefix unleash node server.js
|
20
Vagrantfile
vendored
Normal file
20
Vagrantfile
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
|
||||
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
|
||||
VAGRANTFILE_API_VERSION = "2"
|
||||
|
||||
Vagrant.require_version ">= 1.7.0"
|
||||
|
||||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||
config.vm.provider "virtualbox" do |v|
|
||||
v.memory = 2048
|
||||
v.cpus = 2
|
||||
end
|
||||
|
||||
config.vm.box = "boxcutter/ubuntu1410-docker"
|
||||
|
||||
config.vm.network "private_network", ip: "192.168.12.34"
|
||||
|
||||
config.vm.provision "shell", inline: "/vagrant/helpers/install.sh"
|
||||
end
|
14
helpers/install.sh
Normal file
14
helpers/install.sh
Normal file
@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
echo ""
|
||||
sudo apt-get install unzip
|
||||
|
||||
curl -L -O https://dl.bintray.com/mitchellh/consul/0.5.2_linux_amd64.zip
|
||||
|
||||
unzip 0.5.2_linux_amd64.zip -d /usr/bin
|
||||
|
||||
consul agent -data-dir=/tmp/consul -dc=oslo0 &
|
||||
consul join dev-mod2.finntech.no
|
||||
consul members
|
Loading…
Reference in New Issue
Block a user