Overview
ClassroomIO can be self-hosted using Docker containers. We provide pre-built Docker images for both the API and Dashboard services, making deployment straightforward and consistent across different environments.Prerequisites
- Docker (version 20.x or higher)
- Docker Compose (version 2.x or higher)
- At least 2GB of RAM
- A Supabase instance (local or cloud)
Quick Start
Using Pre-built Images
The easiest way to get started is using our official Docker images from Docker Hub:Docker Compose Setup
- Create a
docker-compose.yamlfile:
docker-compose.yaml
- Create a
.envfile with your configuration:
.env
- Start the services:
- Access your instance:
- Dashboard:
http://localhost:3082 - API:
http://localhost:3081
- Dashboard:
Building Custom Images
If you need to build images from source:Build API Image
Build Dashboard Image
Container Details
API Container
- Base Image:
node:20.19.3-slim - Port: 3081
- Working Directory:
/app - Build Tool: pnpm + turbo
- Size: ~400-600 MB
Dashboard Container
- Base Image:
node:20.19.3-alpine - Port: 3082
- Working Directory:
/app - Framework: SvelteKit
- Size: ~600-800 MB
- User: cio-user (non-root)
Docker Commands
View Logs
Restart Services
Stop Services
Rebuild Services
Check Running Containers
Production Deployment
Resource Requirements
- CPU: 2+ cores recommended
- RAM: 2GB minimum, 4GB recommended
- Storage: 10GB minimum
Best Practices
-
Use specific version tags instead of
latestin production: -
Enable health checks:
-
Use environment-specific configurations:
-
Set up logging:
- Use Docker secrets for sensitive data instead of environment variables
Troubleshooting
Port Conflicts
If ports 3081 or 3082 are already in use:Container Won’t Start
-
Check logs:
- Verify environment variables are set correctly
- Ensure Supabase is accessible
Build Failures
-
Clear Docker cache:
-
Rebuild without cache:
Memory Issues
Increase Docker memory allocation in Docker Desktop settings or add resource limits:Multi-Architecture Support
Our Docker images support both:linux/amd64(x86_64 servers)linux/arm64(ARM servers, Apple Silicon)
Next Steps
Environment Variables
Configure all required environment variables
Supabase Setup
Set up your Supabase database
Custom Domain
Configure custom domains