Check out ShipStation.ai and ShipStation Github
This service handles custom domain routing for ShipStation.ai projects, serving websites from Supabase storage based on domain mappings stored in a Supabase database.
- Dynamic custom domain handling
- Content serving from Supabase storage
- Redis caching for improved performance (included in Docker Compose)
- SSL support via Traefik
- Designed for deployment on Coolify
- Coolify instance
- Supabase account and project
- Traefik (configured in Coolify)
- Clone this repository to your version control system (e.g., GitHub)
- Create a
.env
file based on the.env.example
and fill in the required values:SUPABASE_URL=your_supabase_url SUPABASE_KEY=your_supabase_key SUPABASE_BUCKET=your_supabase_bucket
- Log in to your Coolify dashboard
- Create a new service and connect it to your repository
- Configure the environment variables in Coolify, using the values from your
.env
file - Ensure that Coolify is set to use the
docker-compose.yml
file for deployment - Deploy the service through the Coolify dashboard
- Add custom domain mappings to the
custom_domains
table in your Supabase database - Ensure the corresponding website files are stored in Supabase storage under the
ship_slug
folder - Point the custom domain's DNS A record to your Coolify server's IP address
- The service will automatically serve the correct content for each custom domain
- Monitor logs through the Coolify dashboard
- Update the service by pushing changes to your repository and redeploying through Coolify
- Scale the service using Coolify's scaling options if needed
index.js
: Main application filedomainService.js
: Supabase interaction for domain mappingsDockerfile
: Docker image configurationdocker-compose.yml
: Docker Compose configuration (includes Redis).env
: Environment variables (not in version control).env.example
: Example environment variable file
Redis is included in the docker-compose.yml
file and will be automatically set up when deploying through Coolify. No additional configuration is needed for Redis.
This project is licensed under the MIT License - see the LICENSE.md file for details