Created
April 22, 2014 07:57
-
-
Save dlip/11169293 to your computer and use it in GitHub Desktop.
Simple bash templating for nginx and docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
REGISTRY_IP=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' registry) | |
for f in * | |
do | |
if [[ "$f" != *\.sh ]] | |
then | |
config=$(<$f); | |
config=${config//REGISTRY_IP/$REGISTRY_IP}; | |
printf '%s\n' "$config" >../sites-enabled/$f | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment