Skip to content

Commit

Permalink
Merge pull request #450 from kids-first/rm-vault
Browse files Browse the repository at this point in the history
🔥 Remove vault
  • Loading branch information
dankolbman authored Aug 11, 2020
2 parents c3a76d9 + f03fd9e commit 4d6dc93
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
4 changes: 0 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,4 @@ RUN mkdir -p /var/log/supervisor/conf.d
COPY bin/worker.conf /etc/supervisor/conf.d/worker.conf
COPY bin/scheduler.conf /etc/supervisor/conf.d/scheduler.conf

RUN wget -q -O vault.zip https://releases.hashicorp.com/vault/1.0.3/vault_1.0.3_linux_amd64.zip \
&& unzip vault.zip \
&& mv vault /usr/local/bin

CMD /app/bin/entrypoint.sh
15 changes: 0 additions & 15 deletions bin/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,4 @@
#!/bin/ash
if [[ -n $VAULT_ADDR ]] && [[ -n $VAULT_ROLE ]]; then
vault login -method=aws role=$VAULT_ROLE 2>&1 | grep authent

# Build db connection string
if [[ -n $PG_HOST ]] && [[ -n $PG_NAME ]] && [[ -n $PG_SECRET ]]; then
echo "Load postgres connection from vault"
secrets=$(vault read -format=json ${PG_SECRET} | jq -c '.')
user=$(echo ${secrets} | jq -r '.data.user')
pass=$(echo ${secrets} | jq -r '.data.password')

export PG_USER=$user
export PG_PASS=$pass
fi
fi

# Try to load any database secrets, these will override the above
if [ -n $DATABASE_SECRETS ]; then
aws s3 cp $DATABASE_SECRETS ./database.env
Expand Down

0 comments on commit 4d6dc93

Please sign in to comment.