Skip to content
Snippets Groups Projects
Commit 61e3269b authored by Timothee Gosselin's avatar Timothee Gosselin
Browse files

use docker-compose exec

parent 5c058fca
No related branches found
No related tags found
No related merge requests found
#!/bin/bash -eux
URL=${PWD##*/}
db_container_name=`echo ${URL}_db_1 | sed "s/\.//g" | sed "s/-//g"`; \
docker exec $db_container_name bash -c 'mysqldump --all-databases --events -uroot -p$MYSQL_ROOT_PASSWORD' > ./mysql/dump.sql
docker-compose exec db 'mysqldump --all-databases --events -uroot -p$MYSQL_ROOT_PASSWORD' > ./mysql/dump.sql
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment