added builder script

This commit is contained in:
2024-07-25 12:20:36 -07:00
parent 6bf73092df
commit da629c05d8
24 changed files with 506 additions and 54 deletions
+22
View File
@@ -0,0 +1,22 @@
#!/bin/bash
BLDR_IMAGE_VAR="\${${BLDR_APP^^}_IMAGE:-$BLDR_DC_IMAGE}"
# Generate Docker Compose content and save it to a variable
BLDR_NEW_DCF=$(cat <<EOF
version: '3.4'
services:
stash:
image: $BLDR_IMAGE_VAR
restart: unless-stopped
environment:
$(echo "$BLDR_DC_ENV" | sed 's/^/ - /')
volumes:
$(echo "$BLDR_DC_VOLS" | sed 's/^/ - /')
EOF
)
# Print the variable to verify the content
echo "***** NEW docker-compose.yml *****"
echo "$BLDR_NEW_DCF"