avani-cloud-sentinel / Dockerfile
DJGeneration
Add health proxy endpoint for dashboard monitoring
178bddb
Raw History Blame Contribute Delete
2.49 kB
FROM node:22-slim
LABEL maintainer="FUTRON Neural Network"
LABEL description="AVANI Cloud Sentinel β€” HuggingFace Spaces deployment with Supabase channel bus"
WORKDIR /app
# ─── System Dependencies ─────────────────────────────────────────────────────
RUN apt-get update && apt-get install -y \
git \
curl \
jq \
unzip \
python3 \
python3-pip \
procps \
&& rm -rf /var/lib/apt/lists/*
# ─── AWS CLI v2 (for S3 brain sync) ──────────────────────────────────────────
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \
&& unzip awscliv2.zip \
&& ./aws/install \
&& rm -rf awscliv2.zip aws/ \
&& apt-get purge -y unzip && apt-get autoremove -y
# ─── OpenClaw Gateway ────────────────────────────────────────────────────────
RUN npm install -g openclaw@latest
# ─── Directory Structure ─────────────────────────────────────────────────────
RUN mkdir -p /root/.openclaw/workspace \
/root/.openclaw/logs \
/root/.openclaw/state \
/root/.openclaw/credentials \
/root/.openclaw/bus/outbox \
/root/.openclaw/bus/inbox
# ─── Copy Configuration & Scripts ────────────────────────────────────────────
COPY hf-openclaw.json /root/.openclaw/openclaw.json
COPY hf-entrypoint.sh /app/hf-entrypoint.sh
COPY supabase-bridge.py /app/supabase-bridge.py
COPY suppress-mdns.js /app/suppress-mdns.js
RUN chmod +x /app/hf-entrypoint.sh
# ─── HF Spaces requires port 7860 ───────────────────────────────────────────
EXPOSE 7860
# ─── Health Check (HTTP via health proxy on port 7860) ──
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
CMD curl -sf http://localhost:7860/health > /dev/null || exit 1
# Ensure short hostname for mDNS compatibility (HF container hostnames exceed 63 bytes)
RUN echo "avani" > /etc/hostname
ENTRYPOINT ["/app/hf-entrypoint.sh"]