Skip to content

Commit

Permalink
Merge pull request #1 from crowdbotics/PLAT-7768
Browse files Browse the repository at this point in the history
Use official heroku nginx buildpack
  • Loading branch information
mirr254 authored Jun 7, 2022
2 parents 52fd259 + 835d3b8 commit c1d257a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
web: ./nginx-start.sh && bash start.sh
web: bin/start-nginx bash ./start.sh
4 changes: 2 additions & 2 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
},
"buildpacks": [
{
"url": "https://github.com/iAnanich/heroku-buildpack-vault"
"url": "https://github.com/crowdbotics/heroku-buildpack-vault#1.7.1"
},
{
"url": "https://github.com/pallavkothari/heroku-buildpack-nginx"
"url": "https://github.com/heroku/heroku-buildpack-nginx"
}
],
"formation": {
Expand Down
2 changes: 1 addition & 1 deletion dev-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ storage "s3" {
}
listener "tcp" {
address = "127.0.0.1:8080"
address = "0.0.0.0:${PORT}"
tls_disable = 1
}
Expand Down
2 changes: 1 addition & 1 deletion start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ echo "starting vault..."


./dev-config.sh > /tmp/dev.json
# ./unsealer.sh &
./unsealer.sh &

vault server -config=/tmp/dev.json

6 changes: 3 additions & 3 deletions unsealer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ FIRST=1

while true
do
STATUS=$(curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1:8080)
STATUS=$(curl -s -o /dev/null -w '%{http_code}' http://0.0.0.0:${PORT})
echo "status = ${STATUS}"
if [ ${STATUS} -eq 404 ]; then
echo "listener is up"
curl -X PUT -d "$(generate_post_data)" http://127.0.0.1:${PORT:?}/v1/sys/unseal
curl -X PUT -d "$(generate_post_data)" http://0.0.0.0:$PORT/v1/sys/unseal
echo "done unsealing"
break
else
Expand All @@ -33,4 +33,4 @@ do
echo -n "."
fi
sleep 1
done
done

0 comments on commit c1d257a

Please sign in to comment.