first commit

This commit is contained in:
debu-2 2026-10-02 11:22:40 +05:30
commit efa5080897
127 changed files with 18610 additions and 0 deletions

127
docker-compose.yml Normal file
View file

@ -0,0 +1,127 @@
name: urmi
services:
frontend:
build: ./frontend
ports:
- "5173:5173"
environment:
VITE_API_URL: http://localhost:8000
volumes:
- ./frontend/src:/app/src
- ./frontend/public:/app/public
depends_on:
backend:
condition: service_healthy
backend:
build: ./backend
ports:
- "8000:8000"
extra_hosts:
- "host.docker.internal:host-gateway"
env_file:
- path: .env
required: false
environment:
DATABASE_URL: postgresql+psycopg://urmi:urmi@postgres:5432/urmi
REDIS_URL: redis://redis:6379/0
FRONTEND_ORIGIN: http://localhost:5173
AUTH_SECRET: ${AUTH_SECRET:-urmi-local-development-secret-change-me}
AUTH_COOKIE_SECURE: ${AUTH_COOKIE_SECURE:-false}
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID:-}
GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET:-}
GOOGLE_REDIRECT_URI: ${GOOGLE_REDIRECT_URI:-http://localhost:8000/api/v1/auth/google/callback}
ADMIN_USERNAME: ${ADMIN_USERNAME:-root}
ADMIN_PASSWORD: ${ADMIN_PASSWORD:-Nishtha#01}
ULTRONSMS_BASE_URL: ${ULTRONSMS_BASE_URL:-https://ultronsms.com}
ULTRONSMS_USER: ${ULTRONSMS_USER:-}
ULTRONSMS_PASSWORD: ${ULTRONSMS_PASSWORD:-}
BONVOICE_TOKEN: ${BONVOICE_TOKEN:-}
BONVOICE_API_URL: ${BONVOICE_API_URL:-https://backend.pbx.bonvoice.com/autoDialManagement/autoCallBridging/}
BONVOICE_MEDIA_ALLOWLIST: ${BONVOICE_MEDIA_ALLOWLIST:-103.131.25.5}
VOICE_RELAY_PUBLIC_URL: ${VOICE_RELAY_PUBLIC_URL:-ws://localhost:8000/api/v1/voice}
UPLOAD_DIR: uploads
KYC_TEMPLATE_PATH: assets/kyc-template.docx
volumes:
- ./data/uploads:/app/uploads
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
interval: 5s
timeout: 3s
retries: 10
postgres:
image: postgres:17-alpine
environment:
POSTGRES_DB: urmi
POSTGRES_USER: urmi
POSTGRES_PASSWORD: urmi
ports:
- "5433:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./database/init:/docker-entrypoint-initdb.d:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U urmi -d urmi"]
interval: 5s
timeout: 3s
retries: 10
redis:
image: redis:8-alpine
command: redis-server --appendonly yes
ports:
- "6379:6379"
volumes:
- redis_data:/data
kafka:
image: bitnami/kafka:4.0
profiles: ["data-plane"]
ports:
- "9092:9092"
environment:
KAFKA_CFG_NODE_ID: 0
KAFKA_CFG_PROCESS_ROLES: controller,broker
KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: 0@kafka:9093
KAFKA_CFG_LISTENERS: PLAINTEXT://:9092,CONTROLLER://:9093
KAFKA_CFG_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
KAFKA_CFG_CONTROLLER_LISTENER_NAMES: CONTROLLER
volumes:
- kafka_data:/bitnami/kafka
clickhouse:
image: clickhouse/clickhouse-server:25
profiles: ["analytics"]
ports:
- "8123:8123"
- "9000:9000"
volumes:
- clickhouse_data:/var/lib/clickhouse
minio:
image: minio/minio:latest
profiles: ["object-storage"]
command: server /data --console-address ":9001"
environment:
MINIO_ROOT_USER: urmi
MINIO_ROOT_PASSWORD: urmi-development-only
ports:
- "9001:9001"
- "9002:9000"
volumes:
- object_data:/data
volumes:
postgres_data:
redis_data:
kafka_data:
clickhouse_data:
object_data: