Skip to content

Instantly share code, notes, and snippets.

@vssn
Last active December 13, 2020 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vssn/de47d570e5d9d4c1f78e32d8e23f0c8e to your computer and use it in GitHub Desktop.
Save vssn/de47d570e5d9d4c1f78e32d8e23f0c8e to your computer and use it in GitHub Desktop.
#!/usr/bin/bash
cd laradock
docker-compose stop
docker-compose up -d nginx mariadb
MARIADB_IP=`docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' laradock_mariadb_1`
cd ..
sed -i "s/DB_HOST=.*/DB_HOST=$MARIADB_IP/" .env
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment