diff --git a/app/main.py b/app/main.py index 13c03034..884ea8f0 100644 --- a/app/main.py +++ b/app/main.py @@ -28,7 +28,7 @@ \n • For Vachan-CMS docs: {root_url}/v2/cms/rest/docs,\ \n • For Vachan-TBT docs: {root_url}/v2/text/translate/token-based/docs,\ \n • For Vachan-Auth docs: {root_url}/v2/auth/docs,\ -\n • For Vachan-AI docs: {root_url}/v2/ai/model/docs") +\n • For Vachan-AI docs: {root_url}/v2/ai/docs") template = Jinja2Templates(directory="templates") app.mount("/static", StaticFiles(directory="static"), name="static") @@ -246,7 +246,7 @@ def custom_openapi(): f"
Vachan-TBT docs " f"
Vachan-CMS docs " f"
Vachan-Auth docs " - f"
Vachan-AI docs " + f"
Vachan-AI docs " ), routes=app.routes diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 005b5035..a34f6fd7 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -346,7 +346,7 @@ services: vachan-ai: - image: jayasankarkk/vachan-ai:0.0.0-alpha.4 + image: jayasankarkk/vachan-ai:0.0.0-alpha.5 healthcheck: timeout: 45s interval: 10s @@ -379,13 +379,14 @@ services: - VACHAN_AI_DATA_PATH=${VACHAN_AI_DATA_PATH:-/var/data-vachan-ai} - VACHAN_AI_POSTGRES_PORT=5433 - VACHAN_AI_LOGGING_LEVEL=INFO - - VACHAN_DOMAIN=${VACHAN_DOMAIN:-http://localhost} - - VACHAN_AI_DOMAIN=http://vachan-api - VACHAN_LOGGING_LEVEL=INFO - - VACHAN_AI_ENV=${VACHAN_AI_ENV:-Development} + - VACHAN_AI_ENV=${VACHAN_AI_ENV:-Production} - PYTHONPATH=/app/app/core/model_access/ai_model_core.py:/app/app/core/cloud_operations - VACHAN_REDIS_PASS=${VACHAN_REDIS_PASS:-vsfrgetd} - command: uvicorn main:app --host 0.0.0.0 --port 8006 + - VACHAN_AI_BASEPATH=/v2/ai + - VACHAN_DOMAIN=${VACHAN_DOMAIN:-http://localhost} + - VACHAN_AI_DOMAIN=http://vachan-api + command: uvicorn main:app --host 0.0.0.0 --port 8008 volumes: - ${VACHAN_AI_DATA_PATH}/docker-volumes/ai-logs-vol:/app/logs - ${VACHAN_AI_DATA_PATH}/cache:/root/.cache @@ -397,14 +398,47 @@ services: - local-run - deployment expose: - - 8006 + - 8008 ports: - - "8006:8006" + - "8008:8008" networks: - VE-network container_name: vachan-ai + worker: + image: jayasankarkk/vachan-ai:0.0.0-alpha.5 + healthcheck: + timeout: 45s + interval: 10s + retries: 10 + environment: + - REDIS_HOST=redis + - REDIS_PORT=6379 + - VACHAN_AI_POSTGRES_HOST=dov2conn.bridgeconn.com + - VACHAN_AI_POSTGRES_USER=${VACHAN_AI_POSTGRES_USER:-postgres} + - VACHAN_AI_POSTGRES_PASSWORD=${VACHAN_AI_POSTGRES_PASSWORD:-secret} + - VACHAN_AI_POSTGRES_DATABASE=${VACHAN_AI_POSTGRES_DATABASE:-vachan_ai_db} + - VACHAN_AI_POSTGRES_SCHEMA=${VACHAN_AI_POSTGRES_SCHEMA:-aischema} + - VACHAN_AI_POSTGRES_PORT=5433 + - VACHAN_AI_SERVED_MODEL_URI=${VACHAN_AI_SERVED_MODEL_URI:-http://dov2conn.bridgeconn.com:8085/v2/models} + - PYTHONPATH=/app/app/core/model_access/ai_model_core.py:/app/app/core/cloud_operations + - VACHAN_REDIS_PASS=vsfrgetd + command: rq worker --url redis://:vsfrgetd@redis:6379 + links: + - redis + depends_on: + - redis + - vachan-api + volumes: + - ${VACHAN_AI_DATA_PATH}/docker-volumes/redis_worker-logs-vol:/app/rqlogs + profiles: + - local-run + - deployment + networks: + - VE-network + container_name: redis-worker + # Web Server web-server-local: diff --git a/docker/nginx/default.conf b/docker/nginx/default.conf index 2c1e8c71..a9e07dc5 100644 --- a/docker/nginx/default.conf +++ b/docker/nginx/default.conf @@ -18,14 +18,15 @@ server { proxy_set_header Host $http_host; proxy_set_header X-Forwarded-Proto $scheme; } + + location /v2/ai/ { + proxy_pass http://vachan-ai:8008; + } location /v2/auth/ { proxy_pass http://vachan-access:8007; } - - location /v2/ai/model/ { - proxy_pass http://vachan-ai:8006; - } + location /v2/cms/rest/ { proxy_pass http://vachan-cms-rest:8005; diff --git a/docker/nginx/prod/app.conf.template b/docker/nginx/prod/app.conf.template index bab81e98..dabd3376 100644 --- a/docker/nginx/prod/app.conf.template +++ b/docker/nginx/prod/app.conf.template @@ -37,12 +37,12 @@ server { ssl_certificate_key /etc/nginx/ssl/live/${VACHAN_DOMAIN}/privkey.pem; - location /v2/auth/ { - proxy_pass http://vachan-access:8007; + location /v2/ai/ { + proxy_pass http://vachan-ai:8008; } - location /v2/ai/model/ { - proxy_pass http://vachan-ai:8006; + location /v2/auth/ { + proxy_pass http://vachan-access:8007; } location /v2/cms/rest/ {