参考资料
日常运维的快速查询表和命令。
完整端口映射
应用服务
| 模块 | dev | test | alpha | product |
|---|---|---|---|---|
| app-prometheus | 33020 | 18020 | 19020 | 29020 |
| support-email | 33030 | 18030 | 19030 | 29030 |
| support-file | 33040 | 18040 | 19040 | 29040 |
| support-schedule | 33050 | 18050 | 19050 | 29050 |
| support-tron-wallet | 33060 | 18060 | 19060 | 29060 |
| support-solana-wallet | 33070 | 18070 | 19070 | 29070 |
| partner-slash | 33101 | 18101 | 19101 | 29101 |
| partner-stripe | 33102 | 18102 | 19102 | 29102 |
中间件
| 服务 | dev | test | alpha | product |
|---|---|---|---|---|
| MySQL | 35306 | 18306 | 19306 | 29306 |
| Redis | 35379 | 18379 | 19379 | 29379 |
| RabbitMQ (AMQP) | 35672 | 18572 | 19572 | 29572 |
| RabbitMQ (Management) | 35673 | 18672 | 19672 | 29672 |
| MinIO (API) | 35000 | 18000 | 19000 | 29000 |
| MinIO (Console) | 35001 | 18001 | 19001 | 29001 |
容器命名规范
slaunchx-{module}-{environment}| 容器名 | 服务 |
|---|---|
slaunchx-app-prometheus-test | Core API (test) |
slaunchx-support-email-test | Email service (test) |
slaunchx-mysql-test | MySQL (test) |
slaunchx-redis-test | Redis (test) |
slaunchx-rabbitmq-test | RabbitMQ (test) |
slaunchx-minio-test | MinIO (test) |
健康检查端点
| 模块 | 健康检查 URL |
|---|---|
| app-prometheus | http://localhost:{port}/prometheus/actuator/health |
| support-email | http://localhost:{port}/email-service/actuator/health |
| support-file | http://localhost:{port}/file-service/actuator/health |
| support-schedule | http://localhost:{port}/schedule/actuator/health |
| partner-slash | http://localhost:{port}/partner/channel/slash/actuator/health |
| partner-stripe | http://localhost:{port}/partner/channel/stripe/actuator/health |
| support-tron-wallet | http://localhost:{port}/actuator/health |
| support-solana-wallet | http://localhost:{port}/actuator/health |
Docker 网络
| 属性 | 值 |
|---|---|
| 网络名称 | slaunchx-intra |
| 子网 | 172.30.0.0/24 |
| 网关 | 172.30.0.1 |
| 驱动 | bridge |
文件路径参考
| 路径 | 用途 |
|---|---|
/opt/slaunchx/config/{module}/{env}.env | 环境变量文件 |
/opt/slaunchx/scripts/ | 运维脚本(备份、健康检查) |
/home/backups/mysql/ | MySQL 数据库备份 |
/home/backups/redis/ | Redis RDB 快照 |
/home/registry/data/ | Docker 镜像仓库存储 |
/home/docker-data/ | Docker 数据根目录(镜像、容器、卷) |
Docker 卷参考
| 卷 | 容器 | 挂载点 | 是否关键? |
|---|---|---|---|
mysql-test-data | slaunchx-mysql-test | /var/lib/mysql | 是 |
redis-test-data | slaunchx-redis-test | /data | 是 |
rabbitmq-test-data | slaunchx-rabbitmq-test | /var/lib/rabbitmq | 否(队列为临时数据) |
minio-test-data | slaunchx-minio-test | /data | 是 |
tron-wallet-test-data | slaunchx-support-tron-wallet-test | /data | 关键(钱包密钥) |
solana-wallet-test-data | slaunchx-support-solana-wallet-test | /data | 关键(钱包密钥) |
DANGER
钱包卷包含私钥。丢失这些卷意味着永久丢失资金。在任何破坏性操作之前,请务必备份钱包卷。
命令速查表
服务生命周期
bash
# Start
docker start slaunchx-app-prometheus-test
# Stop
docker stop slaunchx-app-prometheus-test
# Restart
docker restart slaunchx-app-prometheus-test
# View logs
docker logs --tail 100 -f slaunchx-app-prometheus-test
# Enter container shell
docker exec -it slaunchx-app-prometheus-test bash批量操作
bash
# List all SlaunchX containers
docker ps -a --filter "name=slaunchx-" --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"
# Stop all SlaunchX containers
docker ps -q --filter "name=slaunchx-" | xargs -r docker stop
# Remove all stopped SlaunchX containers
docker ps -aq --filter "name=slaunchx-" --filter "status=exited" | xargs -r docker rm数据库
bash
# Connect to MySQL
docker exec -it slaunchx-mysql-test mysql -uslaunchx -p
# Run a query
docker exec -i slaunchx-mysql-test mysql -uslaunchx -p<password> slaunchx -e "SELECT COUNT(*) FROM account;"
# Check Flyway migration status
docker exec -i slaunchx-mysql-test mysql -uslaunchx -p<password> slaunchx \
-e "SELECT version, description, success FROM flyway_schema_history ORDER BY installed_rank DESC LIMIT 5;"Redis
bash
# Connect to Redis CLI
docker exec -it slaunchx-redis-test redis-cli -a <password>
# Check memory usage
docker exec -it slaunchx-redis-test redis-cli -a <password> INFO memory | grep used_memory_human
# Check connected clients
docker exec -it slaunchx-redis-test redis-cli -a <password> INFO clients | grep connected_clientsRabbitMQ
bash
# List queues with message counts
curl -s -u slaunchx:<password> http://localhost:18672/api/queues | \
python3 -c "import sys,json; [print(f'{q[\"name\"]}: {q[\"messages\"]}') for q in json.load(sys.stdin)]"
# Check connections
curl -s -u slaunchx:<password> http://localhost:18672/api/connections | \
python3 -c "import sys,json; print(f'{len(json.load(sys.stdin))} connections')"磁盘与资源
bash
# Docker disk usage
docker system df
# Per-container resource usage
docker stats --no-stream --format "table {{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}" \
$(docker ps -q --filter "name=slaunchx-")