# Note: Coolify now has an official template for quick deployment of a Bluesky PDS # (see here: https://bsky.app/profile/indexx.dev/post/3lxdcz7aat22r) services: pds: image: ghcr.io/bluesky-social/pds:0.4 volumes: - pds-data:/pds environment: # Service Configuration - SERVICE_FQDN_PDS_3000 - PDS_HOSTNAME=${SERVICE_URL_PDS} - PDS_DATA_DIRECTORY=${PDS_DATA_DIRECTORY:-/pds} # Authentication & Security - PDS_JWT_SECRET=${SERVICE_BASE64_PDS} - PDS_ADMIN_PASSWORD=${SERVICE_PASSWORD_PDS} - PDS_ADMIN_EMAIL=${PDS_ADMIN_EMAIL} - PDS_PLC_ROTATION_KEY_K256_PRIVATE_KEY_HEX=${SERVICE_HEX_32_ROTATIONKEY} # Storage Configuration - PDS_BLOBSTORE_DISK_LOCATION=${PDS_DATA_DIRECTORY:-/pds}/blocks - PDS_BLOB_UPLOAD_LIMIT=${PDS_BLOB_UPLOAD_LIMIT:-104857600} # External Services - PDS_DID_PLC_URL=${PDS_DID_PLC_URL:-https://plc.directory} - PDS_BSKY_APP_VIEW_URL=${PDS_BSKY_APP_VIEW_URL:-https://api.pop1.bsky.app} - PDS_BSKY_APP_VIEW_DID=${PDS_BSKY_APP_VIEW_DID:-did:web:api.bsky.app} - PDS_REPORT_SERVICE_URL=${PDS_REPORT_SERVICE_URL:-https://mod.bsky.app} - PDS_REPORT_SERVICE_DID=${PDS_REPORT_SERVICE_DID:-did:plc:ar7c4by46qjdydhdevvrndac} - PDS_CRAWLERS=${PDS_CRAWLERS:-https://bsky.network} # Email Configuration - PDS_EMAIL_SMTP_URL=${PDS_EMAIL_SMTP_URL} - PDS_EMAIL_FROM_ADDRESS=${PDS_EMAIL_FROM_ADDRESS} - PDS_CONTACT_EMAIL_ADDRESS=${PDS_CONTACT_EMAIL_ADDRESS} # Logging - LOG_ENABLED=${LOG_ENABLED:-false} command: | sh -c ' set -euo pipefail echo "Installing required packages and pdsadmin..." apk add --no-cache openssl curl bash jq coreutils gnupg util-linux-misc >/dev/null echo "Downloading pdsadmin..." curl -o /usr/local/bin/pdsadmin.sh https://raw.githubusercontent.com/bluesky-social/pds/main/pdsadmin.sh chmod 700 /usr/local/bin/pdsadmin.sh ln -sf /usr/local/bin/pdsadmin.sh /usr/local/bin/pdsadmin echo "Generating pds.env with all specified Coolify environment variables..." env | awk -F "=" " /^(PDS|LOG|SERVICE)_[A-Z0-9_]+/ { gsub(/\\x27/, \"\\\"\", \$2); print \$1 \"=\\\"\" \$2 \"\\\"\" }" > ${PDS_DATA_DIRECTORY}/pds.env echo "Launching PDS..." exec node --enable-source-maps index.js ' healthcheck: test: ["CMD", "wget", "--spider", "http://127.0.0.1:3000/xrpc/_health"] interval: 2s timeout: 10s retries: 10 volumes: pds-data: