Spaces:
Running
Running
Hugging Face + Supabase Deployment Guide
This repo is configured to run as a single Docker Space on Hugging Face.
What You Need
- A Hugging Face account
- A Supabase project
- Your Supabase PostgreSQL connection string
Step By Step
- Create a Supabase project.
- Open the database settings and copy the PostgreSQL connection string.
- Push this repository to GitHub.
- Create a new Hugging Face Space.
- Choose
Dockeras the Space SDK. - Point the Space at this repository.
- Make sure the Space uses the root Dockerfile.
- Add these Space secrets or variables:
ConnectionStrings__DefaultConnectionJwtSettings__KeyJwtSettings__IssuerJwtSettings__AudiencePasswordReset__RecoveryCode
- Set
ConnectionStrings__DefaultConnectionto your Supabase PostgreSQL connection string. - Leave
WebApi__BaseUrlunset unless you want to override the internal default. - Deploy the Space.
What the Container Does
- Starts the Web API on
127.0.0.1:5001 - Starts the Web App on
127.0.0.1:5000 - Uses Nginx on port
7860as the public entrypoint - Proxies
/api/*to the API - Proxies everything else to the Web App
Notes
- The API now creates the schema on startup if the database is empty.
- The model has been switched from SQL Server to PostgreSQL-friendly mappings.
- If deployment fails, the first thing to check is the Supabase connection string and whether the database is reachable.
First Login
- Open the Hugging Face Space URL.
- Wait for the container to finish starting.
- Try the default demo accounts from the repository README.
- If login works, confirm that dashboard and task pages load normally.