Created
April 12, 2019 18:51
-
-
Save crizstian/c0f7d0a50ba63324acaa025d52519c80 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
DB_HOST=`echo ${hostname} | sed -e 's/ip-//'` | |
IP=`ip -f inet addr show eth0 | grep -Po 'inet \K[\d.]+'` | |
DB_PORT=27017 | |
BOOKSTORE_DBUSER=bookstore | |
BOOKSTORE_DBPASS=bookstorepass1 | |
CINEMA_DBUSER=cinemas | |
CINEMA_DBPASS=cinemaspass1 | |
echo "export DB_HOST=${DB_HOST}" >> /etc/environment | |
echo "export IP=${IP}" >> /etc/environment | |
echo "export DB_PORT=${DB_PORT}" >> /etc/environment | |
echo "export BOOKSTORE_DBUSER=${BOOKSTORE_DBUSER}" >> /etc/environment | |
echo "export BOOKSTORE_DBPASS=${BOOKSTORE_DBPASS}" >> /etc/environment | |
echo "export CINEMA_DBUSER=${CINEMA_DBUSER}" >> /etc/environment | |
echo "export CINEMA_DBPASS=${CINEMA_DBPASS}" >> /etc/environment |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment