| set -e | |
| echo "=== Messenger starting ===" | |
| # Create data directories | |
| mkdir -p /data/conduit | |
| # Sync database from HF bucket (if exists) | |
| if [ -n "$HF_TOKEN" ]; then | |
| echo "Syncing database from bucket..." | |
| hf buckets sync hf://buckets/lvwerra/messenger-storage/conduit-db/ /data/conduit/ \ | |
| 2>/dev/null || echo "No existing data in bucket (first run)" | |
| else | |
| echo "WARNING: HF_TOKEN not set, no persistence!" | |
| fi | |
| echo "Starting services..." | |
| exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf | |