fix: resolve Kong image tag and port conflicts for shared server
- Change Kong base image from kong:3.7-alpine (non-existent) to kong:3.7 - Remap all host ports to avoid conflicts with existing iconsulting services: - Backend services: 13001-13008 (was 3001-3008) - Web admin: 13000 (was 3000) - API gateway: 18000/18001 (was 8000/8001) - PostgreSQL: 15432 (was 5432) - Redis: 16379 (was 6379) - Add container_name with it0- prefix to all services - Update deploy.sh health check ports to match new mappings Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
9120f4927e
commit
e875cd49bb
|
|
@ -320,15 +320,15 @@ status() {
|
|||
health() {
|
||||
# Format: "service-name:port:health-endpoint"
|
||||
local services=(
|
||||
"auth-service:3001:/api/health"
|
||||
"agent-service:3002:/api/health"
|
||||
"ops-service:3003:/api/health"
|
||||
"inventory-service:3004:/api/health"
|
||||
"monitor-service:3005:/api/health"
|
||||
"comm-service:3006:/api/health"
|
||||
"audit-service:3007:/api/health"
|
||||
"voice-service:3008:/health"
|
||||
"api-gateway:8000:/status"
|
||||
"auth-service:13001:/api/health"
|
||||
"agent-service:13002:/api/health"
|
||||
"ops-service:13003:/api/health"
|
||||
"inventory-service:13004:/api/health"
|
||||
"monitor-service:13005:/api/health"
|
||||
"comm-service:13006:/api/health"
|
||||
"audit-service:13007:/api/health"
|
||||
"voice-service:13008:/health"
|
||||
"api-gateway:18000:/status"
|
||||
)
|
||||
|
||||
echo "Application Services:"
|
||||
|
|
@ -349,15 +349,15 @@ health() {
|
|||
echo "Infrastructure:"
|
||||
|
||||
if docker compose -f "$COMPOSE_FILE" --env-file "$ENV_FILE" exec -T postgres pg_isready -U it0 &>/dev/null; then
|
||||
echo -e " ${GREEN}[OK]${NC} PostgreSQL (port 5432)"
|
||||
echo -e " ${GREEN}[OK]${NC} PostgreSQL (port 15432)"
|
||||
else
|
||||
echo -e " ${RED}[FAIL]${NC} PostgreSQL (port 5432)"
|
||||
echo -e " ${RED}[FAIL]${NC} PostgreSQL (port 15432)"
|
||||
fi
|
||||
|
||||
if docker compose -f "$COMPOSE_FILE" --env-file "$ENV_FILE" exec -T redis redis-cli ping &>/dev/null; then
|
||||
echo -e " ${GREEN}[OK]${NC} Redis (port 6379)"
|
||||
echo -e " ${GREEN}[OK]${NC} Redis (port 16379)"
|
||||
else
|
||||
echo -e " ${RED}[FAIL]${NC} Redis (port 6379)"
|
||||
echo -e " ${RED}[FAIL]${NC} Redis (port 16379)"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
@ -517,15 +517,15 @@ infra_status() {
|
|||
echo "Health Check:"
|
||||
|
||||
if docker compose -f "$COMPOSE_FILE" --env-file "$ENV_FILE" exec -T postgres pg_isready -U it0 &>/dev/null; then
|
||||
echo -e " ${GREEN}[OK]${NC} PostgreSQL (port 5432)"
|
||||
echo -e " ${GREEN}[OK]${NC} PostgreSQL (port 15432)"
|
||||
else
|
||||
echo -e " ${RED}[FAIL]${NC} PostgreSQL (port 5432)"
|
||||
echo -e " ${RED}[FAIL]${NC} PostgreSQL (port 15432)"
|
||||
fi
|
||||
|
||||
if docker compose -f "$COMPOSE_FILE" --env-file "$ENV_FILE" exec -T redis redis-cli ping &>/dev/null; then
|
||||
echo -e " ${GREEN}[OK]${NC} Redis (port 6379)"
|
||||
echo -e " ${GREEN}[OK]${NC} Redis (port 16379)"
|
||||
else
|
||||
echo -e " ${RED}[FAIL]${NC} Redis (port 6379)"
|
||||
echo -e " ${RED}[FAIL]${NC} Redis (port 16379)"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,12 +2,13 @@ services:
|
|||
# ===== Infrastructure =====
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
container_name: it0-postgres
|
||||
environment:
|
||||
POSTGRES_USER: ${POSTGRES_USER:-it0}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-it0_dev}
|
||||
POSTGRES_DB: ${POSTGRES_DB:-it0}
|
||||
ports:
|
||||
- "5432:5432"
|
||||
- "15432:5432"
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
- ./scripts/init-databases.sh:/docker-entrypoint-initdb.d/init-databases.sh
|
||||
|
|
@ -21,8 +22,9 @@ services:
|
|||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
container_name: it0-redis
|
||||
ports:
|
||||
- "6379:6379"
|
||||
- "16379:6379"
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 10s
|
||||
|
|
@ -35,9 +37,10 @@ services:
|
|||
api-gateway:
|
||||
build:
|
||||
context: ../../packages/gateway
|
||||
container_name: it0-api-gateway
|
||||
ports:
|
||||
- "8000:8000"
|
||||
- "8001:8001"
|
||||
- "18000:8000"
|
||||
- "18001:8001"
|
||||
depends_on:
|
||||
auth-service:
|
||||
condition: service_started
|
||||
|
|
@ -69,8 +72,9 @@ services:
|
|||
args:
|
||||
SERVICE_NAME: auth-service
|
||||
SERVICE_PORT: 3001
|
||||
container_name: it0-auth-service
|
||||
ports:
|
||||
- "3001:3001"
|
||||
- "13001:3001"
|
||||
environment:
|
||||
- DB_HOST=postgres
|
||||
- DB_PORT=5432
|
||||
|
|
@ -96,8 +100,9 @@ services:
|
|||
args:
|
||||
SERVICE_NAME: agent-service
|
||||
SERVICE_PORT: 3002
|
||||
container_name: it0-agent-service
|
||||
ports:
|
||||
- "3002:3002"
|
||||
- "13002:3002"
|
||||
environment:
|
||||
- DB_HOST=postgres
|
||||
- DB_PORT=5432
|
||||
|
|
@ -123,8 +128,9 @@ services:
|
|||
args:
|
||||
SERVICE_NAME: ops-service
|
||||
SERVICE_PORT: 3003
|
||||
container_name: it0-ops-service
|
||||
ports:
|
||||
- "3003:3003"
|
||||
- "13003:3003"
|
||||
environment:
|
||||
- DB_HOST=postgres
|
||||
- DB_PORT=5432
|
||||
|
|
@ -148,8 +154,9 @@ services:
|
|||
args:
|
||||
SERVICE_NAME: inventory-service
|
||||
SERVICE_PORT: 3004
|
||||
container_name: it0-inventory-service
|
||||
ports:
|
||||
- "3004:3004"
|
||||
- "13004:3004"
|
||||
environment:
|
||||
- DB_HOST=postgres
|
||||
- DB_PORT=5432
|
||||
|
|
@ -172,8 +179,9 @@ services:
|
|||
args:
|
||||
SERVICE_NAME: monitor-service
|
||||
SERVICE_PORT: 3005
|
||||
container_name: it0-monitor-service
|
||||
ports:
|
||||
- "3005:3005"
|
||||
- "13005:3005"
|
||||
environment:
|
||||
- DB_HOST=postgres
|
||||
- DB_PORT=5432
|
||||
|
|
@ -195,8 +203,9 @@ services:
|
|||
args:
|
||||
SERVICE_NAME: comm-service
|
||||
SERVICE_PORT: 3006
|
||||
container_name: it0-comm-service
|
||||
ports:
|
||||
- "3006:3006"
|
||||
- "13006:3006"
|
||||
environment:
|
||||
- DB_HOST=postgres
|
||||
- DB_PORT=5432
|
||||
|
|
@ -223,8 +232,9 @@ services:
|
|||
args:
|
||||
SERVICE_NAME: audit-service
|
||||
SERVICE_PORT: 3007
|
||||
container_name: it0-audit-service
|
||||
ports:
|
||||
- "3007:3007"
|
||||
- "13007:3007"
|
||||
environment:
|
||||
- DB_HOST=postgres
|
||||
- DB_PORT=5432
|
||||
|
|
@ -242,8 +252,9 @@ services:
|
|||
voice-service:
|
||||
build:
|
||||
context: ../../packages/services/voice-service
|
||||
container_name: it0-voice-service
|
||||
ports:
|
||||
- "3008:3008"
|
||||
- "13008:3008"
|
||||
environment:
|
||||
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
|
||||
- AGENT_SERVICE_URL=http://agent-service:3002
|
||||
|
|
@ -259,12 +270,13 @@ services:
|
|||
web-admin:
|
||||
build:
|
||||
context: ../../it0-web-admin
|
||||
container_name: it0-web-admin
|
||||
ports:
|
||||
- "3000:3000"
|
||||
- "13000:3000"
|
||||
environment:
|
||||
- API_BASE_URL=http://api-gateway:8000
|
||||
- NEXT_PUBLIC_API_BASE_URL=/api/proxy
|
||||
- NEXT_PUBLIC_WS_URL=ws://localhost:8000
|
||||
- NEXT_PUBLIC_WS_URL=ws://localhost:18000
|
||||
depends_on:
|
||||
- api-gateway
|
||||
networks:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM kong:3.7-alpine
|
||||
FROM kong:3.7
|
||||
|
||||
COPY config/kong.yml /etc/kong/kong.yml
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue