FROM alpine:latest

# Install FFmpeg, Bash, and Python 3
RUN apk add --no-cache ffmpeg bash python3

WORKDIR /app

COPY . /app

# Expose port 7860 for Hugging Face health checks
EXPOSE 7860

# Keep a very small webserver running so the Spaces health check succeeds, but do not start the radio automatically.
# This keeps the container alive for debugging; run ./run_radio.sh manually from the container shell when ready.
CMD ["sh", "-c", "python3 -m http.server 7860 >/dev/null 2>&1 & sleep infinity"]
