迁移服务器;分开开发端与生产端;去除废弃接口;对象存储、Kong网关使用SSL;修改所有使用内网地址的代码;切换域名;更新Ktor、ws-scrcpy启动服务;修改Prometheus配置;

This commit is contained in:
BBIT-Kai
2025-10-28 16:33:54 +08:00
parent 08eb2d84eb
commit 2e0a2633bc
23 changed files with 153 additions and 119 deletions
@@ -29,19 +29,20 @@ scrape_configs:
- job_name: 'redis'
static_configs:
- targets:
- ce_redis_exporter:9121
- targets: ['ce_redis_exporter:9121']
- job_name: 'node_exporter'
static_configs:
- targets: ['10.10.10.9:9100']
- targets: ['172.17.0.1:9100']
- job_name: 'minio'
scheme: https
metrics_path: /minio/v2/metrics/cluster
static_configs:
- targets: ['10.10.10.9:9000']
- targets: ['ai.ronsunny.cn:9000']
- job_name: 'docker'
static_configs:
- targets: ['10.10.10.9:9323']
- targets: ['172.17.0.1:9323']
+4 -4
View File
@@ -2,7 +2,7 @@ services:
# ---------- Vue 前端 ----------
vue:
container_name: ce_vue
image: s1.ronsunny.cn:13011/bbit_ai/ce_vue:latest
image: ai.ronsunny.cn:13011/bbit_ai/ce_vue:latest
networks:
- ce_network
restart: always
@@ -10,14 +10,14 @@ services:
# ---------- Python 后端 ----------
backend:
container_name: ce_pybackend
image: s1.ronsunny.cn:13011/bbit_ai/ce_pybackend:latest
image: ai.ronsunny.cn:13011/bbit_ai/ce_pybackend:latest
networks:
- ce_network
restart: unless-stopped
depends_on:
- vue
extra_hosts:
- "s1.ronsunny.cn:10.10.10.9"
volumes:
- /home/bbit/ssl/ai.ronsunny.cn.pem:/ssl/ai.ronsunny.cn.pem
# ---------- 网络 ----------
networks:
+45 -6
View File
@@ -55,6 +55,8 @@ services:
- "9001:9001"
volumes:
- minio_data:/data
- /home/bbit/ssl/ai.ronsunny.cn.pem:/root/.minio/certs/public.crt
- /home/bbit/ssl/ai.ronsunny.cn.key:/root/.minio/certs/private.key
networks:
- ce_network
command: server /data --console-address ":9001"
@@ -95,12 +97,21 @@ services:
- seccomp:unconfined
environment:
ETCD_ENDPOINTS: etcd:2379
MINIO_ADDRESS: minio:9000
MQ_TYPE: woodpecker
MINIO_ADDRESS: ai.ronsunny.cn:9000
MINIO_BUCKET_NAME: a-bucket
MINIO_USE_SSL: true
MINIO_ACCESS_KEY_ID: minioadmin
MINIO_SECRET_ACCESS_KEY: minioadmin
MINIO_REGION: Chengdu
# MINIO_CA_PATH: /ssl/certs/
networks:
- ce_network
volumes:
- milvus_data:/var/lib/milvus
- /home/bbit/ssl/ai.ronsunny.cn.pem:/ssl/public.crt
# - /home/bbit/ssl/ai.ronsunny.cn.key:/ssl/private.key
# - ./config/milvus/milvus.yaml:/milvus/configs/milvus.yaml
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9091/healthz"]
interval: 30s
@@ -166,10 +177,13 @@ services:
KONG_PROXY_ERROR_LOG: /dev/stderr
KONG_PREFIX: /var/run/kong
KONG_PROXY_LISTEN: "0.0.0.0:8090" # 对外暴露端口
KONG_ADMIN_LISTEN: "0.0.0.0:8001" # Admin GUI
KONG_PROXY_LISTEN: "0.0.0.0:8090 ssl" # 对外暴露端口
KONG_ADMIN_LISTEN: "0.0.0.0:8001" # Admin
KONG_ADMIN_GUI_LISTEN: "0.0.0.0:8002"
KONG_SSL_CERT: /etc/kong/certs/ai.ronsunny.cn.pem
KONG_SSL_CERT_KEY: /etc/kong/certs/ai.ronsunny.cn.key
KONG_PLUGINS: bundled,prometheus
KONG_PROMETHEUS_STATUS_CODE_METRICS: "on"
KONG_PROMETHEUS_LATENCY_METRICS: "on"
@@ -182,7 +196,7 @@ services:
volumes:
- kong_prefix_vol:${KONG_PREFIX:-/var/run/kong}
- kong_tmp_vol:/tmp
- ./config/kong:/opt/kong
- /home/bbit/ssl:/etc/kong/certs
networks:
- ce_network
restart: unless-stopped
@@ -194,6 +208,7 @@ services:
environment:
RABBITMQ_DEFAULT_USER: admin
RABBITMQ_DEFAULT_PASS: 123456
hostname: ce_rabbitmq
ports:
- "5672:5672"
- "15672:15672"
@@ -285,25 +300,49 @@ services:
- '/:/host:ro,rslave'
restart: unless-stopped
# ---------- ollama ----------
ollama:
image: ollama/ollama:0.12.6
container_name: ce_ollama
runtime: nvidia # 关键,确保容器用 NVIDIA GPU
volumes:
- ollama_data:/root/.ollama
ports:
- "11434:11434"
networks:
- ce_network
restart: unless-stopped
# ---------- 数据卷 ----------
volumes:
grafana_data:
name: ce_grafana_data
postgres_data:
name: ce_postgres_data
redis_data:
name: ce_redis_data
minio_data:
name: ce_minio_data
etcd_data:
name: ce_etcd_data
milvus_data:
name: ce_milvus_data
kong_prefix_vol:
name: ce_kong_prefix_data
driver_opts:
type: tmpfs
device: tmpfs
kong_tmp_vol:
name: ce_kong_tmp_data
driver_opts:
type: tmpfs
device: tmpfs
rabbitmq_data:
prometheus_config:
name: ce_rabbitmq_data
prometheus_data:
name: ce_prometheus_data
ollama_data: # 定义 ollama 的数据卷
name: ce_ollama_data
# ---------- 网络 ----------
networks: