From ca854b9835fc0e2b31651d199651d00a605148c7 Mon Sep 17 00:00:00 2001 From: Michiel de Jong <michiel@unhosted.org> Date: Tue, 14 Oct 2014 17:17:40 +0100 Subject: [PATCH] move unsecure certs to Vagrantfile and activate default domain --- Vagrantfile | 1 + scripts/setup.sh | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index d790840..0a03b2c 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -44,6 +44,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| core.vm.network :private_network, ip: "#{BASE_IP_ADDR}.#{i+1}" 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, inline: "etcdctl set /services/default '{\"app\":\"nginx\", \"hostname\":\"#{HOSTNAME}\"}'" core.vm.provision :shell, path: "./scripts/approve-user.sh", args: [HOSTNAME, "nginx"] diff --git a/scripts/setup.sh b/scripts/setup.sh index 175d22c..bed7870 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -15,8 +15,10 @@ docker pull indiehosters/mysql docker pull indiehosters/wordpress docker pull indiehosters/nginx +# Activate default domain +etcdctl set /services/default '{"app":"nginx", "hostname":"`hostname`"}' + # Configure and start HAproxy mkdir -p /data/server-wide/haproxy/approved-certs -cp /data/infrastructure/scripts/unsecure-certs/*.pem /data/server-wide/haproxy/approved-certs systemctl enable haproxy.service systemctl start haproxy.service -- GitLab