mirror of
https://github.com/nickyeoman/docker-compose-cookbooks.git
synced 2026-09-04 02:46:23 +00:00
added builder script
This commit is contained in:
@@ -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"
|
||||
Reference in New Issue
Block a user