Skip to content

参考资料

日常运维的快速查询表和命令。

完整端口映射

应用服务

模块devtestalphaproduct
app-prometheus33020180201902029020
support-email33030180301903029030
support-file33040180401904029040
support-schedule33050180501905029050
support-tron-wallet33060180601906029060
support-solana-wallet33070180701907029070
partner-slash33101181011910129101
partner-stripe33102181021910229102

中间件

服务devtestalphaproduct
MySQL35306183061930629306
Redis35379183791937929379
RabbitMQ (AMQP)35672185721957229572
RabbitMQ (Management)35673186721967229672
MinIO (API)35000180001900029000
MinIO (Console)35001180011900129001

容器命名规范

slaunchx-{module}-{environment}
容器名服务
slaunchx-app-prometheus-testCore API (test)
slaunchx-support-email-testEmail service (test)
slaunchx-mysql-testMySQL (test)
slaunchx-redis-testRedis (test)
slaunchx-rabbitmq-testRabbitMQ (test)
slaunchx-minio-testMinIO (test)

健康检查端点

模块健康检查 URL
app-prometheushttp://localhost:{port}/prometheus/actuator/health
support-emailhttp://localhost:{port}/email-service/actuator/health
support-filehttp://localhost:{port}/file-service/actuator/health
support-schedulehttp://localhost:{port}/schedule/actuator/health
partner-slashhttp://localhost:{port}/partner/channel/slash/actuator/health
partner-stripehttp://localhost:{port}/partner/channel/stripe/actuator/health
support-tron-wallethttp://localhost:{port}/actuator/health
support-solana-wallethttp://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-dataslaunchx-mysql-test/var/lib/mysql
redis-test-dataslaunchx-redis-test/data
rabbitmq-test-dataslaunchx-rabbitmq-test/var/lib/rabbitmq否(队列为临时数据)
minio-test-dataslaunchx-minio-test/data
tron-wallet-test-dataslaunchx-support-tron-wallet-test/data关键(钱包密钥)
solana-wallet-test-dataslaunchx-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_clients

RabbitMQ

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-")

内部手册