25 lines
677 B
Bash
Executable File
25 lines
677 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# Seed design templates into the mounted volume on first boot.
|
|
SEED_DIR="/app/service_design_templates_seed"
|
|
TARGET_DIR="/app/service_design_templates"
|
|
if [[ -d "$SEED_DIR" ]]; then
|
|
mkdir -p "$TARGET_DIR"
|
|
# only copy when target has no template.json yet
|
|
if ! find "$TARGET_DIR" -type f -name 'template.json' 2>/dev/null | grep -q .; then
|
|
echo "[entrypoint] seeding design templates into volume..."
|
|
cp -a "$SEED_DIR"/. "$TARGET_DIR"/
|
|
fi
|
|
fi
|
|
|
|
# Ensure runtime dirs exist
|
|
mkdir -p \
|
|
/app/service_workspace \
|
|
/app/service_assets \
|
|
/app/service_projects \
|
|
/app/service_fonts \
|
|
/app/service_design_templates
|
|
|
|
exec "$@"
|