curl -O https://gist.githubusercontent.com/sebastian13/cc58304f7b177ac1d16d7671dc67efb9/raw/docker-mysql-dump.sh
curl -O https://gist.githubusercontent.com/sebastian13/cc58304f7b177ac1d16d7671dc67efb9/raw/docker-mysql-restore.sh
MYSQL_DATABASE=example
MYSQL_ROOT_PASSWORD=123456
services:
example-1:
...
env_file: .env
example-2:
...
environment:
- MYSQL_DATABSE=${MYSQL_DATABSE}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
I just had a problem with
source .env, but replacing this line with. ./.envworked. Thanks for these scripts, amazing work!