mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-05-05 01:32:35 +00:00
- Updated .env.example to include optional split ports for API and dashboard. - Modified docker-compose files to dynamically use the configured ports. - Introduced a new script (run-standalone.mjs) for running the server with environment-specific ports. - Implemented an API bridge server to handle OpenAI-compatible routes when using split ports. - Updated README and CLI tool documentation to reflect changes in port usage and configuration. - Enhanced various components to utilize the new port configuration, ensuring backward compatibility.
47 lines
1.8 KiB
YAML
47 lines
1.8 KiB
YAML
# ──────────────────────────────────────────────────────────────────────
|
|
# OmniRoute — Docker Compose (Production Snapshot)
|
|
# ──────────────────────────────────────────────────────────────────────
|
|
#
|
|
# Isolated production instance running on port 20130.
|
|
# Keeps the app running while you continue developing locally.
|
|
#
|
|
# Usage:
|
|
# docker compose -f docker-compose.prod.yml up -d --build
|
|
# docker compose -f docker-compose.prod.yml down
|
|
# docker compose -f docker-compose.prod.yml logs -f
|
|
# ──────────────────────────────────────────────────────────────────────
|
|
|
|
services:
|
|
omniroute-prod:
|
|
container_name: omniroute-prod
|
|
build:
|
|
context: .
|
|
target: runner-base
|
|
image: omniroute:prod
|
|
restart: unless-stopped
|
|
env_file: .env
|
|
environment:
|
|
- NODE_ENV=production
|
|
- PORT=20128
|
|
- HOSTNAME=0.0.0.0
|
|
- DATA_DIR=/app/data
|
|
ports:
|
|
- "20130:20128"
|
|
volumes:
|
|
- omniroute-prod-data:/app/data
|
|
healthcheck:
|
|
test:
|
|
[
|
|
"CMD",
|
|
"node",
|
|
"-e",
|
|
"const p=process.env.DASHBOARD_PORT||process.env.PORT||'20128';fetch('http://127.0.0.1:'+p+'/api/settings').then(r=>{if(!r.ok)throw r.status}).catch(()=>process.exit(1))",
|
|
]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 15s
|
|
|
|
volumes:
|
|
omniroute-prod-data:
|
|
name: omniroute-prod-data
|