配置StarFireAPI部署:端口6580,外部Redis(172.18.0.2:6379),前端显示StarFireAPI
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
BIND_HOST=0.0.0.0
|
||||
|
||||
# Server port (exposed on host)
|
||||
SERVER_PORT=8080
|
||||
SERVER_PORT=6580
|
||||
|
||||
# Server mode: release or debug
|
||||
SERVER_MODE=release
|
||||
@@ -35,10 +35,12 @@ POSTGRES_PASSWORD=change_this_secure_password
|
||||
POSTGRES_DB=sub2api
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Redis Configuration
|
||||
# Redis Configuration (External Redis)
|
||||
# -----------------------------------------------------------------------------
|
||||
# Leave empty for no password (default for local development)
|
||||
REDIS_PASSWORD=
|
||||
# Using external Redis server at 172.18.0.2:6379
|
||||
REDIS_HOST=172.18.0.2
|
||||
REDIS_PORT=6379
|
||||
REDIS_PASSWORD=redis_JCHeKT
|
||||
REDIS_DB=0
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
@@ -24,7 +24,7 @@ services:
|
||||
soft: 100000
|
||||
hard: 100000
|
||||
ports:
|
||||
- "${BIND_HOST:-0.0.0.0}:${SERVER_PORT:-8080}:8080"
|
||||
- "${BIND_HOST:-0.0.0.0}:${SERVER_PORT:-6580}:8080"
|
||||
volumes:
|
||||
# Data persistence (config.yaml will be auto-generated here)
|
||||
- sub2api_data:/app/data
|
||||
@@ -58,9 +58,9 @@ services:
|
||||
# =======================================================================
|
||||
# Redis Configuration
|
||||
# =======================================================================
|
||||
- REDIS_HOST=redis
|
||||
- REDIS_PORT=6379
|
||||
- REDIS_PASSWORD=${REDIS_PASSWORD:-}
|
||||
- REDIS_HOST=${REDIS_HOST:-172.18.0.2}
|
||||
- REDIS_PORT=${REDIS_PORT:-6379}
|
||||
- REDIS_PASSWORD=${REDIS_PASSWORD:-redis_JCHeKT}
|
||||
- REDIS_DB=${REDIS_DB:-0}
|
||||
|
||||
# =======================================================================
|
||||
@@ -119,8 +119,6 @@ services:
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- sub2api-network
|
||||
healthcheck:
|
||||
@@ -160,9 +158,12 @@ services:
|
||||
# 如需调试,可临时添加:ports: ["127.0.0.1:5433:5432"]
|
||||
|
||||
# ===========================================================================
|
||||
# Redis Cache
|
||||
# Redis Cache (DISABLED - Using external Redis at 172.18.0.2:6379)
|
||||
# ===========================================================================
|
||||
# Uncomment below if you want to use the built-in Redis instead of external
|
||||
redis:
|
||||
profiles:
|
||||
- disabled
|
||||
image: redis:8-alpine
|
||||
container_name: sub2api-redis
|
||||
restart: unless-stopped
|
||||
|
||||
Reference in New Issue
Block a user