make default site an argument of scripts/setup.sh

This commit is contained in:
Michiel de Jong 2014-10-14 17:23:14 +01:00
parent ca854b9835
commit f673d82717
2 changed files with 2 additions and 2 deletions

2
Vagrantfile vendored
View file

@ -45,7 +45,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
core.vm.synced_folder ".", "/data/infrastructure", id: "coreos-infrastructure", :nfs => true, :mount_options => ['nolock,vers=3,udp']
core.vm.provision :file, source: "./cloud-config", destination: "/tmp/vagrantfile-user-data"
core.vm.provision :shell, inline: "cp /data/infrastructure/scripts/unsecure-certs/*.pem /data/server-wide/haproxy/approved-certs"
core.vm.provision :shell, path: "./scripts/setup.sh"
core.vm.provision :shell, path: "./scripts/setup.sh", args: [HOSTNAME]
core.vm.provision :shell, inline: "etcdctl set /services/default '{\"app\":\"nginx\", \"hostname\":\"#{HOSTNAME}\"}'"
core.vm.provision :shell, path: "./scripts/approve-user.sh", args: [HOSTNAME, "nginx"]
end

View file

@ -16,7 +16,7 @@ docker pull indiehosters/wordpress
docker pull indiehosters/nginx
# Activate default domain
etcdctl set /services/default '{"app":"nginx", "hostname":"`hostname`"}'
etcdctl set /services/default '{"app":"nginx", "hostname":"'$1'"}'
# Configure and start HAproxy
mkdir -p /data/server-wide/haproxy/approved-certs