#!/bin/bash
set -e

# Ensure data directories exist
mkdir -p /data/designs
mkdir -p /var/log/supervisor

echo "[rDesign] Starting Scribus noVNC container..."
echo "[rDesign] Screen: ${SCREEN_WIDTH}x${SCREEN_HEIGHT}x${SCREEN_DEPTH}"
echo "[rDesign] noVNC port: ${NOVNC_PORT}, Bridge port: ${BRIDGE_PORT}"

exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
