update the deploy and new service
This commit is contained in:
@@ -82,6 +82,26 @@ if [ -f "docker/$APP/.env.keys" ] && [ -f /etc/bws-token ]; then
|
||||
fi
|
||||
|
||||
cd "docker/$APP"
|
||||
|
||||
# Create directories marked with "# !create" in .gitignore
|
||||
if [ -f .gitignore ]; then
|
||||
create_next=false
|
||||
while IFS= read -r line || [ -n "$line" ]; do
|
||||
if [ "$line" = "# !create" ]; then
|
||||
create_next=true
|
||||
continue
|
||||
fi
|
||||
if [ "$create_next" = true ] && [ -n "$line" ]; then
|
||||
dir="${line%/}"
|
||||
if [ -n "$dir" ]; then
|
||||
mkdir -p "$dir"
|
||||
echo "Created directory: $dir"
|
||||
fi
|
||||
create_next=false
|
||||
fi
|
||||
done < .gitignore
|
||||
fi
|
||||
|
||||
if grep -q '^\s*build:' compose.yml 2>/dev/null; then
|
||||
docker compose build
|
||||
else
|
||||
|
||||
@@ -25,6 +25,7 @@ fi
|
||||
|
||||
echo "Creating docker/$APP/compose.yml..."
|
||||
mkdir -p "$REPO_ROOT/docker/$APP"
|
||||
touch "$REPO_ROOT/docker/$APP/.gitignore"
|
||||
cat > "$REPO_ROOT/docker/$APP/compose.yml" <<EOF
|
||||
services:
|
||||
$APP:
|
||||
|
||||
Reference in New Issue
Block a user