diff --git a/deploy-frontend.sh b/deploy-frontend.sh index 09df5f6..b189be4 100755 --- a/deploy-frontend.sh +++ b/deploy-frontend.sh @@ -18,6 +18,11 @@ docker run --detach \ --restart=always \ --cpus=4 \ --memory=8g \ + --health-cmd="wget -q 'http://127.0.0.1:3080/healthz' -O /dev/null || exit 1" \ + --health-interval=5s \ + --health-timeout=10s \ + --health-retries=3 \ + --health-start-period=300s \ -e DEPLOY_TYPE=pure-docker \ -e GOMAXPROCS=12 \ -e JAEGER_AGENT_HOST=jaeger \ diff --git a/deploy.sh b/deploy.sh index 5a238cd..52ce813 100755 --- a/deploy.sh +++ b/deploy.sh @@ -30,9 +30,9 @@ for i in $(seq 0 $(($NUM_INDEXED_SEARCH - 1))); do ./deploy-zoekt-webserver.sh $ # Redis must be started before these. ./deploy-frontend-internal.sh # Wait for frontend-internal to run migrations before starting remaining frontend containers -while [ "$(docker inspect sourcegraph-frontend-internal --format '{{.State.Status}}')" != "running" ] +while [ "$(docker inspect sourcegraph-frontend-internal --format '{{.State.Health.Status}}')" != "healthy" ] do - echo "waiting for interal frontend to start" + echo "waiting for internal frontend to start" sleep 5 done diff --git a/test/Vagrantfile b/test/Vagrantfile index d1ff9cd..977ce3a 100644 --- a/test/Vagrantfile +++ b/test/Vagrantfile @@ -40,7 +40,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| g.image = ENV['IMAGE'] g.image_project_id = 'sourcegraph-ci' g.google_project_id = project_id - g.name = "#{server['name']}-"+"#{Time.now.to_i}" + g.name = "#{server['name']}-"+"#{Time.now.to_i}"+"#{rand(100000)}" g.network = server['network'] g.external_ip = external_ip g.use_private_ip = use_private_ip