Custom Docker Setup & Scripts
To avoid port conflicts and maintain a clean development environment, I created a custom configuration setup for Onyx with the following key features:
All custom configs stored at:
~/Projects/onyx-custom-config/Custom port configuration to avoid conflicts with existing services:
# Custom port configuration for Onyx
# This file extends docker-compose.dev.yml with custom ports to avoid conflicts
services:
# Override nginx to use port 5050 instead of 80
nginx:
ports: !override
- "5050:80" # Main web interface: http://localhost:5050
# API server with custom port mapping
api_server:
ports:
- "5008:8080" # API endpoint: http://localhost:5008
environment:
- AUTH_TYPE=disabled # For local development
# For SSO integration, use:
# - AUTH_TYPE=saml
# - SAML_IDP_METADATA_URL=${SSO_METADATA_URL}
# PostgreSQL with custom port to avoid 5432 conflict
relational_db:
ports:
- "5433:5432" # PostgreSQL: localhost:5433
# Redis with custom port to avoid 6379 conflict
cache:
ports:
- "5379:6379" # Redis: localhost:5379
# Vespa index with custom port
index:
ports:
- "5019:19071" # Vespa: http://localhost:5019Created symlinks from Onyx deployment directory to custom config:
ln -s ~/Projects/onyx-custom-config/start.sh ~/Projects/onyx/deployment/docker_compose/start-onyx.shThis allows running scripts from either directory while maintaining version control.