This guide explains how to deploy the BSSCI Service Center using Docker and Docker Compose.
- Docker Engine 20.10+
- Docker Compose 2.0+
# Build and start the service
docker-compose up --build
# Run in background
docker-compose up -d --buildThe service will be available at:
- Web UI: http://localhost:5056
- TLS Server: localhost:16019
# Use production configuration
docker-compose -f docker-compose.prod.yml up -d --buildThe service will be available at:
- Web UI: http://localhost:5000
- TLS Server: localhost:16018
Set these in your environment or .env file:
UID=1000 # User ID for file permissions
GID=1000 # Group ID for file permissionsThe following directories are mounted as volumes:
./certs- SSL certificates (read-only)./endpoints.json- Sensor configuration./bssci_config.py- Service configuration./logs- Application logs
The container will automatically generate self-signed SSL certificates if none are provided in the ./certs directory.
For production, provide your own certificates:
certs/
├── ca_cert.pem
├── service_center_cert.pem
└── service_center_key.pem# View logs
docker-compose logs -f
# Stop service
docker-compose down
# Restart service
docker-compose restart
# Update and restart
docker-compose pull && docker-compose up -d
# Remove everything (including volumes)
docker-compose down -vThe container includes a health check that verifies both the TLS server (port 16018) and Web UI (port 5000) are responding.
Check health status:
docker-compose psIf you encounter permission issues with logs or certificates:
# Set correct ownership
sudo chown -R $USER:$USER certs/ logs/
# Or run with specific user
UID=$(id -u) GID=$(id -g) docker-compose upRegenerate certificates:
# Remove old certificates
rm -rf certs/*
# Restart container (will auto-generate)
docker-compose restartIf ports are already in use, modify the port mappings in docker-compose.yml:
ports:
- "16020:16018" # Change external port
- "5057:5000" # Change external port- Change default MQTT credentials in
bssci_config.py - Use proper SSL certificates for production
- Restrict network access to required ports only
- Regular security updates of base images