The Problem
Supabase’s official Docker Compose setup works fine for development. Production with Docker Swarm? Not so much.
Issues I ran into:
- Environment variables not loading correctly
- Network configurations breaking between services
- S3 configuration warnings everywhere
- No clear migration path from dev to production
The Solution
After 6 months of running this in production, I packaged it into a working deployment setup.
git clone https://github.com/tsensei/supabase-swarm.git
cd supabase-swarm
./setup.sh --swarm
./deploy-swarm.sh
What’s Different
Docker Swarm Configuration
- Proper service replicas and placement
- Health checks and rollback configs
- Network isolation
- Volume management
Deployment Methods
- Docker Compose for development
- Docker Swarm for production
- Portainer integration for GUI management
Documentation
- Configuration guide
- Troubleshooting common issues
- External resource setup (S3, SMTP, databases)
Why Swarm, Not Kubernetes?
For self-hosted Supabase, Swarm is simpler:
- Built into Docker
- No additional tooling
- Good enough for single or small clusters
If you need K8s-level orchestration, you probably need managed Supabase anyway.
Links
Repository: github.com/tsensei/supabase-swarm
The repo has full documentation. If you run into issues, open a GitHub issue.