CAPI / Dockerfile
cjovs's picture
Enable startup-time CPA auto-update with bucket-safe auth paths
1caafb1 verified
FROM debian:bookworm-slim
WORKDIR /app
RUN apt-get update && \
apt-get install -y wget ca-certificates curl jq gettext-base inotify-tools && \
rm -rf /var/lib/apt/lists/*
# Download latest CLI Proxy API for Linux
RUN LATEST_URL=$(curl -s https://api.github.com/repos/router-for-me/CLIProxyAPI/releases/latest | jq -r '.assets[] | select(.name | test("linux.*amd64.*tar.gz")) | .browser_download_url') && \
echo "Downloading: $LATEST_URL" && \
wget -q "$LATEST_URL" -O cli-proxy-api.tar.gz && \
tar -xzf cli-proxy-api.tar.gz && \
find . -name "cli-proxy-api" -type f -exec mv {} /app/cli-proxy-api \; && \
rm -rf cli-proxy-api.tar.gz CLIProxyAPI* && \
chmod +x /app/cli-proxy-api
# Copy config template
COPY config.yaml /app/config.template.yaml
# Create Supabase sync script
COPY supabase-sync.sh /app/supabase-sync.sh
RUN chmod +x /app/supabase-sync.sh
# Create startup script
COPY start.sh /app/start.sh
RUN chmod +x /app/start.sh
EXPOSE 7860
CMD ["/app/start.sh"]