Middleware Setup
The backend platform requires four middleware services. Deploy them before any application service.
Quick Start (Docker Compose)
If you have the ops repository, start all middleware at once:
bash
cd slaunchx-ops-devops/projects/slaunchx-backend-platform/deploy/docker
docker compose -f docker-compose.test.yml up -d mysql redis rabbitmq minioOtherwise, follow the manual steps below.
1. MySQL 8.4
Start Container
bash
docker run -d \
--name slaunchx-mysql-test \
--network slaunchx-intra \
-p 127.0.0.1:18306:3306 \
-e MYSQL_ROOT_PASSWORD=<root-password> \
-e MYSQL_DATABASE=slaunchx \
-e MYSQL_USER=slaunchx \
-e MYSQL_PASSWORD=<app-password> \
-v mysql-test-data:/var/lib/mysql \
--restart unless-stopped \
mysql:8.4 \
--character-set-server=utf8mb4 \
--collation-server=utf8mb4_unicode_ci \
--max-connections=500Create Additional Databases
The wallet services require their own databases:
bash
docker exec -i slaunchx-mysql-test mysql -uroot -p<root-password> <<'SQL'
CREATE DATABASE IF NOT EXISTS slaunchx_tron_wallet
CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE DATABASE IF NOT EXISTS slaunchx_solana_wallet
CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
GRANT ALL PRIVILEGES ON slaunchx_tron_wallet.* TO 'slaunchx'@'%';
GRANT ALL PRIVILEGES ON slaunchx_solana_wallet.* TO 'slaunchx'@'%';
FLUSH PRIVILEGES;
SQLVerify
bash
docker exec -it slaunchx-mysql-test mysql -uslaunchx -p<app-password> -e "SHOW DATABASES;"
# Expected: slaunchx, slaunchx_tron_wallet, slaunchx_solana_walletDatabase Schema
Tables are created automatically by Flyway on first application startup. Do NOT manually create tables.
2. Redis 7.2
Start Container
bash
docker run -d \
--name slaunchx-redis-test \
--network slaunchx-intra \
-p 127.0.0.1:18379:6379 \
-v redis-test-data:/data \
--restart unless-stopped \
redis:7.2-alpine \
redis-server --appendonly yes --maxmemory 256mb --maxmemory-policy allkeys-lru \
--requirepass <redis-password>Verify
bash
docker exec -it slaunchx-redis-test redis-cli -a <redis-password> PING
# Expected: PONG3. RabbitMQ 3.13
Start Container
bash
docker run -d \
--name slaunchx-rabbitmq-test \
--network slaunchx-intra \
-p 127.0.0.1:18572:5672 \
-p 127.0.0.1:18672:15672 \
-e RABBITMQ_DEFAULT_USER=slaunchx \
-e RABBITMQ_DEFAULT_PASS=<rabbitmq-password> \
-v rabbitmq-test-data:/var/lib/rabbitmq \
--restart unless-stopped \
rabbitmq:3.13-managementPort 18672 provides the Management UI — useful for monitoring queues and connections.
Verify
bash
# AMQP connection
docker exec -it slaunchx-rabbitmq-test rabbitmqctl status | head -5
# Management UI (from the host)
curl -s -u slaunchx:<rabbitmq-password> http://127.0.0.1:18672/api/overview | head -1
# Expected: JSON response with RabbitMQ version4. MinIO (S3-compatible Object Storage)
Start Container
bash
docker run -d \
--name slaunchx-minio-test \
--network slaunchx-intra \
-p 127.0.0.1:18000:9000 \
-p 127.0.0.1:18001:9001 \
-e MINIO_ROOT_USER=<minio-access-key> \
-e MINIO_ROOT_PASSWORD=<minio-secret-key> \
-v minio-test-data:/data \
--restart unless-stopped \
minio/minio:latest server /data --console-address ":9001"Port 18001 provides the MinIO Console (web UI).
Create Default Bucket
bash
# Install mc (MinIO Client) if not available
docker exec -it slaunchx-minio-test mc alias set local http://localhost:9000 <access-key> <secret-key>
docker exec -it slaunchx-minio-test mc mb local/slaunchxVerify
bash
docker exec -it slaunchx-minio-test mc ls local/
# Expected: [2026-...] slaunchx/Network Binding Strategy
| Service Type | Bind Address | Reason |
|---|---|---|
| Middleware (MySQL, Redis, etc.) | 127.0.0.1 | Not exposed to LAN — only reachable via Docker network |
| Application services | 0.0.0.0 | Accessible from reverse proxy / load balancer |
Containers on the slaunchx-intra Docker network reach each other by container name (e.g. slaunchx-mysql-test), regardless of host port binding.
Post-Setup Checklist
- [ ] MySQL running, three databases created,
slaunchxuser has access - [ ] Redis running with password auth, AOF persistence enabled
- [ ] RabbitMQ running, Management UI accessible
- [ ] MinIO running,
slaunchxbucket created - [ ] All containers are on the
slaunchx-intranetwork - [ ] All middleware bound to
127.0.0.1(not0.0.0.0)