Skip to content

Commit

Permalink
Ensure we do not encounter a race condition which can occur when read…
Browse files Browse the repository at this point in the history
…ing/writing to same file
  • Loading branch information
bdwyertech committed Dec 31, 2021
1 parent 578f78d commit 1b3a91b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docker-manifest/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
# Magic to Provision the Container
# Brian Dwyer - Intelligent Digital Services

export AWS_REGION="${AWS_REGION:-$AWS_DEFAULT_REGION}"

# Default to the AWS Resolver
export RESOLVER=${RESOLVER:-'169.254.169.253'}
export RESOLVER="${RESOLVER:-'169.254.169.253'}"

envsubst '\$RESOLVER \$AWS_ACCOUNT \$AWS_REGION' < /etc/nginx/conf.d/default.conf > /tmp/config && mv /tmp/config /etc/nginx/conf.d/default.conf

envsubst '\$RESOLVER \$AWS_ACCOUNT \$AWS_REGION' < /etc/nginx/conf.d/default.conf | tee /etc/nginx/conf.d/default.conf
cat /etc/nginx/conf.d/default.conf

# Create SSL Certificate
if [ ! -f /etc/nginx/ssl/cert.pem ]; then
Expand Down

0 comments on commit 1b3a91b

Please sign in to comment.