Repository navigation
docker deployment
Soketi.rs is available as a Docker image on Docker Hub, making deployment simple and straightforward.
Docker Hub Repository: ferdiunal/soketi-rs
# Pull the latest image
docker pull funal/soketi-rs:latest
# Run the server
docker run -d \
--name soketi \
-p 6001:6001 \
-p 9601:9601 \
funal/soketi-rs:latestCreate a docker-compose.yml file:
version: '3.8'
services:
soketi:
image: funal/soketi-rs:latest
ports:
- "6001:6001"
- "9601:9601"
volumes:
- ./config.json:/app/config.json
restart: unless-stopped
redis:
image: redis:alpine
ports:
- "6379:6379"
restart: unless-stoppedStart the services:
docker-compose up -dCreate a config.json file in your project directory:
{
"host": "0.0.0.0",
"port": 6001,
"metrics_port": 9601,
"apps": [
{
"id": "app-id",
"key": "app-key",
"secret": "app-secret",
"max_connections": 100,
"enable_client_messages": true,
"enabled": true
}
]
}Mount it to the container:
docker run -d \
--name soketi \
-p 6001:6001 \
-p 9601:9601 \
-v $(pwd)/config.json:/app/config.json \
funal/soketi-rs:latestdocker run -d \
--name soketi \
-p 6001:6001 \
-p 9601:9601 \
-e SOKETI_HOST=0.0.0.0 \
-e SOKETI_PORT=6001 \
-e SOKETI_METRICS_PORT=9601 \
funal/soketi-rs:latest-
latest- Latest stable release -
v1.x.x- Specific semantic version -
main- Latest development build
-
linux/amd64- x86_64 architecture -
linux/arm64- ARM64 architecture (Apple Silicon, AWS Graviton, etc.)
- 6001 - WebSocket server (default)
- 9601 - Metrics endpoint (Prometheus compatible)
- ✅ Pusher protocol compatible
- ✅ WebSocket support
- ✅ Public, private, and presence channels
- ✅ Client events
- ✅ Webhooks
- ✅ Prometheus metrics
- ✅ Multiple adapters (Local, Redis, NATS, Cluster)
- ✅ High performance
- ✅ Low memory footprint
version: '3.8'
services:
soketi:
image: funal/soketi-rs:latest
ports:
- "6001:6001"
- "9601:9601"
volumes:
- ./config.json:/app/config.json
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379
depends_on:
- redis
restart: unless-stopped
redis:
image: redis:alpine
restart: unless-stoppedScale horizontally with multiple instances:
docker-compose up -d --scale soketi=3# Check server status
curl http://localhost:6001/health
# Check metrics
curl http://localhost:9601/metricsAdd Prometheus to your docker-compose.yml:
services:
prometheus:
image: prom/prometheus
ports:
- "9090:9090"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
restart: unless-stoppedCreate prometheus.yml:
global:
scrape_interval: 15s
scrape_configs:
- job_name: 'soketi'
static_configs:
- targets: ['soketi:9601']# Docker
docker logs soketi
# Docker Compose
docker-compose logs -f soketi# Docker
docker restart soketi
# Docker Compose
docker-compose restart soketidocker-compose down -v
docker-compose up -dThe project uses GitHub Actions for automated Docker image builds and deployments. Images are automatically built and pushed to Docker Hub when:
-
Push to main branch - Creates
maintag -
Version tags - Creates versioned tags (e.g.,
v1.0.0,1.0,1) - Pull requests - Builds only (no push)
Images are built for multiple architectures:
-
linux/amd64- Standard x86_64 servers -
linux/arm64- ARM-based servers (AWS Graviton, Apple Silicon, etc.)
- Multi-stage builds - Smaller final images (~100-200MB)
- Build cache - Faster subsequent builds
- Layer optimization - Efficient Docker layer caching
The Docker Hub README is automatically updated from the repository on each release.
# Build for your platform
docker build -t soketi-rs .
# Build for multiple platforms
docker buildx build --platform linux/amd64,linux/arm64 -t soketi-rs .The CI/CD pipeline handles this automatically, but for manual publishing:
# Login to Docker Hub
docker login
# Build and push
docker buildx build --platform linux/amd64,linux/arm64 \
-t funal/soketi-rs:latest \
--push .# Tag a new version
git tag v1.0.0
git push origin v1.0.0
# GitHub Actions will automatically:
# 1. Build the Docker image
# 2. Push to Docker Hub with version tags
# 3. Update Docker Hub README- GitHub Issues: Report a bug
- GitHub Discussions: Ask questions
- Documentation: Full docs
MIT License - see LICENSE for details.