use healthchecks in pure docker (#276)

* use healthcheck to fix db lock
This commit is contained in:
davejrt authored and GitHub committed 2021-03-02 07:41:53 -05:00
1 parent 818ff41dbc
commit b196165e53
3 files changed
+8 -3

No files matched your search

+5
View File
@@ -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 \
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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