Customize to setup a VM
This commit is contained in:
parent
9067e9ae35
commit
583ec495b1
40 changed files with 122 additions and 1500 deletions
27
run-docker-compose.sh
Executable file
27
run-docker-compose.sh
Executable file
|
|
@ -0,0 +1,27 @@
|
|||
#!/bin/bash
|
||||
|
||||
# examples:
|
||||
# ./run-docker-compose.sh --env-file ./.env up -d
|
||||
# ./run-docker-compose.sh --env-file ./.env down
|
||||
|
||||
# Exit on errors
|
||||
set -e
|
||||
|
||||
# Ensure arguments are provided
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "Usage: $0 <docker compose arguments>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Store the user-provided arguments
|
||||
ARGS="$@"
|
||||
|
||||
# Find all directories containing a file named docker-compose*.yml
|
||||
find . -type f -name 'docker-compose*.yml' | while IFS= read -r compose_file; do
|
||||
|
||||
# Run the docker compose command with user arguments
|
||||
echo "Running: docker compose $compose_file"
|
||||
docker compose -f "$compose_file" $ARGS
|
||||
|
||||
done
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue