mirror of
https://github.com/MatthewL246/pretendo-docker.git
synced 2026-08-26 21:04:16 -05:00
Create empty local.env files before running docker compose down
Fixes #91
This commit is contained in:
@@ -51,6 +51,13 @@ if ls ./*.local.env >/dev/null 2>&1; then
|
||||
fi
|
||||
|
||||
print_info "Stopping containers and removing existing local environment files..."
|
||||
# If a new server was added in an update, `docker compose down` will fail unless the necessary local environment
|
||||
# files exist, even if the new server isn't running. The contents of the files don't matter, so they can be empty.
|
||||
for file in *.env; do
|
||||
if [ -f "$file" ]; then
|
||||
touch "${file%%.*}.local.env"
|
||||
fi
|
||||
done
|
||||
compose_no_progress down
|
||||
rm ./*.local.env
|
||||
rm "$git_base_dir/.env"
|
||||
|
||||
Reference in New Issue
Block a user