-
Notifications
You must be signed in to change notification settings - Fork 120
Deployment Guide
Bytedesk deployment assets are in the deploy/ directory, with Docker Compose being the most complete and recommended approach.
deploy/
├── docker/ # Docker Compose configurations (recommended)
│ ├── compose-base.yaml # Base middleware services
│ ├── compose-db-mysql.yaml # MySQL database
│ ├── compose-db-postgresql.yaml # PostgreSQL database
│ ├── compose-db-oracle.yaml # Oracle database
│ ├── compose-db-kingbase9.yaml # KingbaseES database
│ ├── compose-mq-artemis.yaml # Artemis message queue
│ ├── compose-mq-rabbitmq.yaml # RabbitMQ message queue
│ ├── compose-app-bytedesk.yaml # Bytedesk application
│ ├── compose-scenario-*.yaml # Scenario configurations
│ ├── start.sh # Start script
│ └── stop.sh # Stop script
├── kubernetes/ # Kubernetes deployment files
├── nginx/ # Nginx configuration
├── sql/ # Database initialization scripts
└── server/ # Server configuration and scripts
cd deploy/docker
cp .env.example .env
# Edit .env and update passwords and secrets
# Default: MySQL + Artemis + standard, full stack
./start.sh mysql artemis standard all./start.sh <db> <mq> <scenario> <target>./stop.sh <db> <mq> <scenario> <action> <target>| Parameter | Options | Description |
|---|---|---|
| db |
mysql, postgresql, oracle, kingbase9
|
Database selection |
| mq |
artemis, rabbitmq
|
Message queue selection |
| scenario |
standard, noai, call, webrtc, call-webrtc
|
Deployment scenario |
| target |
middleware, all
|
Deploy middleware only or full stack |
| action |
stop, down
|
Stop containers or remove them |
# MySQL + Artemis + standard (most common for development)
./start.sh mysql artemis standard middleware
./stop.sh mysql artemis standard stop middleware
./stop.sh mysql artemis standard down middleware
# PostgreSQL + RabbitMQ + noai (without AI)
./start.sh postgresql rabbitmq noai middleware
./stop.sh postgresql rabbitmq noai stop middleware
# Oracle + Artemis + noai
./start.sh oracle artemis noai middleware
# Kingbase9 + Artemis + standard
./start.sh kingbase9 artemis standard middleware# Call center middleware (FreeSWITCH)
./start.sh mysql artemis call middleware
./stop.sh mysql artemis call stop middleware
# Call center full deployment
./start.sh mysql rabbitmq call all# WebRTC middleware (coturn + janus)
./start.sh mysql artemis webrtc middleware
./stop.sh mysql artemis webrtc stop middleware
# WebRTC full deployment
./start.sh mysql artemis webrtc all# Both call center and WebRTC
./start.sh mysql artemis call-webrtc middleware
./stop.sh mysql artemis call-webrtc stop middleware
# Full deployment with both
./start.sh postgresql artemis call-webrtc all# Standard production deployment
./start.sh mysql artemis standard all
./stop.sh mysql artemis standard stop all
# PostgreSQL + RabbitMQ production
./start.sh postgresql rabbitmq standard all
# Kingbase9 + Artemis production
./start.sh kingbase9 artemis standard allAll sensitive configuration is centralized in .env. At minimum, set:
MYSQL_ROOT_PASSWORDPOSTGRES_PASSWORDORACLE_PASSWORDORACLE_APP_USER_PASSWORDKINGBASE_DB_PASSWORDKINGBASE_SYSTEM_PWDARTEMIS_PASSWORDRABBITMQ_DEFAULT_PASS
REDIS_PASSWORDELASTIC_PASSWORDMINIO_ROOT_PASSWORD
BYTEDESK_ADMIN_PASSWORDBYTEDESK_ADMIN_VALIDATE_CODEBYTEDESK_MEMBER_PASSWORDBYTEDESK_JWT_SECRET_KEY
-
COTURN_PASS- For WebRTC scenario -
FREESWITCH_ESL_PASSWORD- For call scenario
-
SPRING_AI_*_API_KEY- AI provider keys -
BYTEDESK_TRANSLATE_BAIDU_*- Translation service -
BYTEDESK_LICENSE_KEY- License key (if applicable)
-
Never commit
.envto version control - Replace default passwords before production
-
Use separate
.envfiles for different environments - Consider encrypting sensitive values (see Jasypt section below)
- MySQL - Recommended default, best documentation
- PostgreSQL - Good for teams with existing PostgreSQL infrastructure
- Oracle/KingbaseES - For enterprise or government requirements
- Artemis - Default message queue, recommended first choice
- RabbitMQ - For teams with existing RabbitMQ operations
-
Start simple - Use
standardornoaifirst -
Add capabilities later - Add
callorwebrtcwhen needed - Test incrementally - Verify each scenario works before combining
Before going to production:
- Replace all default passwords in
.env - Configure proper database persistence
- Set up backup strategy for databases
- Configure SSL/TLS certificates
- Set up monitoring and alerting
- Configure log rotation and retention
- Set up proper network security (firewall rules)
- Configure resource limits and autoscaling
- Test failover and disaster recovery
- Verify all required scenarios work correctly
- Update admin credentials and access controls
- Set up proper DNS and domain names
- Configure email and notification services
- Document the deployment configuration
If you need to store encrypted values in your configuration:
# Add Jasypt password to .env (never commit real secrets)
echo 'JASYPT_ENCRYPTOR_PASSWORD=please-change-me' >> .env
# Start deployment as usual
./start.sh mysql artemis standard all- Leave
JASYPT_ENCRYPTOR_PASSWORDblank if not using encrypted values - The application will fall back to plain text values automatically
- You can override encryption algorithm with additional variables if needed
The deployment includes Logstash and Kibana for log management:
# Logstash automatically collects logs from:
# - Docker container logs
# - Local source-run logs in starter/logs/
# View Logstash status
docker compose -p bytedesk --env-file .env -f compose-base.yaml ps bytedesk-logstash
# View Logstash logs
docker compose -p bytedesk --env-file .env -f compose-base.yaml logs -f bytedesk-logstash
# List Elasticsearch log indices
curl -u elastic:${ELASTIC_PASSWORD} http://127.0.0.1:19200/_cat/indices/bytedesk-logs-*?v- Kibana URL: http://127.0.0.1:15601
- Elasticsearch: http://127.0.0.1:19200
-
Username:
elastic -
Password: From
.env(default:bytedesk123)
First steps in Kibana:
- Create a data view for
bytedesk-logs-* - Use
@timestampas the time field - Search logs by
requestId,traceId, ormessage
If you need more control, you can use Docker Compose directly:
# Middleware only (for source development)
docker compose -p bytedesk -f compose-base.yaml -f compose-db-mysql.yaml -f compose-mq-artemis.yaml -f compose-scenario-standard.yaml up -d
# Full stack (middleware + application)
docker compose -p bytedesk -f compose-base.yaml -f compose-db-mysql.yaml -f compose-mq-artemis.yaml -f compose-scenario-standard.yaml -f compose-app-bytedesk.yaml -f compose-app-mq-artemis.yaml up -d
# With call center
docker compose -p bytedesk -f compose-base.yaml -f compose-db-postgresql.yaml -f compose-mq-artemis.yaml -f compose-scenario-call.yaml -f compose-call-db-postgresql.yaml -f compose-app-bytedesk.yaml -f compose-app-mq-artemis.yaml up -d
# Stop containers
docker compose -p bytedesk -f compose-base.yaml -f compose-db-mysql.yaml -f compose-mq-artemis.yaml -f compose-scenario-standard.yaml stopKubernetes deployment files are in deploy/kubernetes/. See the README in that directory for details.
Nginx configuration examples are in deploy/nginx/. Use them for:
- Reverse proxy
- SSL/TLS termination
- Static file serving
- Load balancing
-
Containers not starting?
- Check
.envfile permissions and format - Verify Docker has enough resources
- Check port conflicts
- Check
-
Application can't connect to database?
- Verify database is running
- Check network connectivity
- Verify credentials in
.env
-
Message queue issues?
- Check if Artemis/RabbitMQ is running
- Verify connection settings
- Check queue and topic configurations
-
Scenario not working?
- Make sure you're using the right scenario parameter
- Verify all required containers are running
- Check logs for scenario-specific errors
# Check running containers
docker compose -p bytedesk ps
# View all logs
docker compose -p bytedesk logs -f
# View specific service logs
docker compose -p bytedesk logs -f bytedesk-mysql
# Restart a service
docker compose -p bytedesk restart bytedesk-redis
# Enter a container for debugging
docker exec -it bytedesk-mysql bash
# Go back to baseline if needed
./stop.sh mysql artemis standard down middleware
./start.sh mysql artemis standard middlewareAfter deployment:
- Application URL: http://127.0.0.1:9003/ (replace with your server IP)
- Admin Email: admin@email.com
- Admin Password: admin (change this immediately!)
Remember to change all default credentials before production use!