bigchaindb/k8s/tendermint/nginx_container/nginx_entrypoint.bash
muawiakh a348c72696 Deployment of Tendermint + BigchainDB cluster
- Update existing docker-containers to support tendermint integration, nginx,
  mongodb, bigchaindb
- Add tendermint configuration files for statefulset, pvc, pv and service.
- Update some READMEs.
2018-01-02 14:51:23 +01:00

22 lines
601 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
# Tendermint public key access port
tm_pub_key_access_port=`printenv TM_PUB_KEY_ACCESS_PORT`
if [[ -z "${tm_pub_key_access_port:?TM_PUB_KEY_ACCESS_PORT not specified. Exiting}" ]]; then
exit 1
else
echo TM_PUB_KEY_ACCESS_PORT="$tm_pub_key_access_port"
fi
NGINX_CONF_FILE=/etc/nginx/conf.d/access_pub_key.conf
# configure the access_pub_key file with env variable(s)
sed -i "s|PUBLIC_KEY_ACCESS_PORT|${tm_pub_key_access_port}|g" ${NGINX_CONF_FILE}
cat /etc/nginx/conf.d/access_pub_key.conf
# start nginx
echo "INFO: starting nginx..."
exec nginx -g "daemon off;"