Something went wrong. Try again.
Personal atproto services deployment handbook
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233#!/usr/bin/env bashset -euo pipefail
out_dir=${1:-generated}mkdir -p "$out_dir"
render_file() { template=$1 output=$2 if command -v envsubst >/dev/null 2>&1; then envsubst < "$template" > "$output" else cp "$template" "$output" printf 'WARN: envsubst is missing; copied template without substitution: %s\n' "$output" >&2 fi}
case "$out_dir" in generated|generated/*|rendered|rendered/*|local|local/*) ;; *) printf 'Refusing to render outside ignored output directories: %s\n' "$out_dir" >&2 exit 2 ;;esac
render_file config/pds.env.example "$out_dir/pds.env"render_file config/pds-backup.env.example "$out_dir/pds-backup.env"render_file config/caddy-origin-ca.Caddyfile.example "$out_dir/Caddyfile"
printf 'Rendered config templates into %s\n' "$out_dir"