Docker installation
suSHi runs as a containerized application using Docker Compose, orchestrating a PostgreSQL database and the suSHi backend service.Prerequisites
- Docker Engine 20.10 or later
- Docker Compose v2.0 or later
- At least 512MB of available RAM
- Port 8080 available (or customize the port)
Installation steps
Configure database directory
Create the PostgreSQL data directory with proper permissions:
The Bitnami PostgreSQL image runs as user ID 1001. Setting these permissions prevents database initialization errors.
Create docker-compose.yaml
Create a
docker-compose.yaml file with the following configuration:docker-compose.yaml
Start the services
Launch suSHi with Docker Compose:Verify the services are running:Both
postgres and sushi-backend should show as “running”.Environment variables
Configure suSHi by modifying these environment variables in thesushi-backend service:
Server configuration
| Variable | Default | Description |
|---|---|---|
SERVER_PORT | 8080 | Port the HTTP server listens on |
LOG_LEVEL | Debug | Logging level: Debug or Info |
JWT_SECRET | secret123 | Secret key for JWT token generation |
Database configuration
| Variable | Default | Description |
|---|---|---|
DB_HOST | postgres | Database host (use service name for Docker) |
DB_PORT | 5432 | PostgreSQL port |
DB_USER | postgres | Database username |
DB_PASSWORD | postgres | Database password |
DB_NAME | sushi | Database name |
MIGRATE_DB | true | Automatically run database migrations on startup |
The database configuration should match the PostgreSQL service environment variables.
OAuth configuration
suSHi supports authentication via Google and GitHub OAuth:Google OAuth
| Variable | Description |
|---|---|
GOOGLE_CLIENT_ID | OAuth 2.0 Client ID from Google Cloud Console |
GOOGLE_CLIENT_SECRET | OAuth 2.0 Client Secret |
GOOGLE_REDIRECT_URL | Callback URL: http://your-domain:8080/api/v1/auth/callback |
Create OAuth credentials
- Go to Google Cloud Console
- Create a new project or select an existing one
- Navigate to APIs & Services > Credentials
- Click Create Credentials > OAuth 2.0 Client ID
- Choose Web application
GitHub OAuth
| Variable | Description |
|---|---|
GITHUB_CLIENT_ID | OAuth App Client ID from GitHub |
GITHUB_CLIENT_SECRET | OAuth App Client Secret |
GITHUB_REDIRECT_URL | Callback URL: http://your-domain:8080/api/v1/auth/callback |
Register OAuth App
- Go to GitHub Developer Settings
- Click New OAuth App
- Fill in the application details
OAuth is optional for development but recommended for production deployments to secure access to your suSHi instance.
Advanced configuration
Custom ports
To run suSHi on a different port, update the port mapping:docker-compose.yaml
Update OAuth redirect URLs if you change the port.
Persistent logs
To persist application logs, add a volume mount:docker-compose.yaml
Production considerations
Managing the installation
View logs
Restart services
Stop services
Update to latest version
Remove all data
Troubleshooting
Database connection failed
Database connection failed
Ensure PostgreSQL is running and healthy:Check that database credentials match between services.
Permission denied on db/data
Permission denied on db/data
Fix directory permissions:
Port already in use
Port already in use
Check what’s using the port:Either stop the conflicting service or change suSHi’s port in
docker-compose.yaml.WebSocket connection issues
WebSocket connection issues
For local development, you may need to use
ws:// instead of wss://. This is a known issue documented in the source.In production, ensure you’re using HTTPS and wss:// protocol.Next steps
Quickstart guide
Connect to your first machine via SSH through the browser.
Configuration reference
Explore all available configuration options.