From 66fe78a2827781d0783cd50fb7cc99538ef50c1e Mon Sep 17 00:00:00 2001 From: Gelu Mihes Date: Mon, 11 May 2026 15:56:21 +0300 Subject: [PATCH] Changes --- docker-compose/docker-compose.production.yml | 39 ++++++++++---------- docker-compose/docker-compose.staging.yml | 39 ++++++++++---------- docker-compose/docker-compose.yml | 19 +++++----- 3 files changed, 50 insertions(+), 47 deletions(-) diff --git a/docker-compose/docker-compose.production.yml b/docker-compose/docker-compose.production.yml index 97c2152..9593ae8 100644 --- a/docker-compose/docker-compose.production.yml +++ b/docker-compose/docker-compose.production.yml @@ -1,14 +1,12 @@ -version: "3.8" - services: rag-api: image: registry.easysoft.ro/apps/myai-rag-api:production container_name: myai-rag-api environment: # ASP.NET - - ASPNETCORE_ENVIRONMENT=${ASPNETCORE_ENVIRONMENT:-Development} + - ASPNETCORE_ENVIRONMENT=${ASPNETCORE_ENVIRONMENT:-Production} - ASPNETCORE_URLS=${ASPNETCORE_URLS:-http://+:8080} - - APP_ENVIRONMENT_NAME=${APP_ENVIRONMENT_NAME:-myai.local} + - APP_ENVIRONMENT_NAME=${APP_ENVIRONMENT_NAME:-myai.production} - LogEnvironmentOnStartup=${LogEnvironmentOnStartup:-true} # Database: matches rag-api appsettings Database section @@ -20,8 +18,8 @@ services: - Database__TrustServerCertificate=${Database__TrustServerCertificate:-true} # InternalApi: matches rag-api appsettings InternalApi section - - InternalApi__ApiKey=${InternalApi__ApiKey:-change-this-internal-key} - - InternalApi__RequireApiKey=${InternalApi__RequireApiKey:-false} + - InternalApi__ApiKey=${RagApi__InternalApiKey:-change-this-internal-key} + - InternalApi__RequireApiKey=${RagApi__RequireApiKey:-false} # Rag: matches rag-api appsettings Rag section - Rag__MaxFileSizeMb=${Rag__MaxFileSizeMb:-8} @@ -55,6 +53,8 @@ services: - Serilog__WriteTo__2__Args__networkCredential__password=${Serilog__WriteTo__2__Args__networkCredential__password:-} - Serilog__WriteTo__2__Args__port=${Serilog__WriteTo__2__Args__port:-587} - Serilog__WriteTo__2__Args__enableSsl=${Serilog__WriteTo__2__Args__enableSsl:-true} + volumes: + - myai_rag_api_logs:/app/logs networks: - myai-network restart: unless-stopped @@ -68,9 +68,9 @@ services: - rag-api environment: # ASP.NET - - ASPNETCORE_ENVIRONMENT=${ASPNETCORE_ENVIRONMENT:-Development} + - ASPNETCORE_ENVIRONMENT=${ASPNETCORE_ENVIRONMENT:-Production} - ASPNETCORE_URLS=${ASPNETCORE_URLS:-http://+:8080} - - APP_ENVIRONMENT_NAME=${APP_ENVIRONMENT_NAME:-myai.local} + - APP_ENVIRONMENT_NAME=${APP_ENVIRONMENT_NAME:-myai.production} - LogEnvironmentOnStartup=${LogEnvironmentOnStartup:-true} # Database: matches cv-matcher-api appsettings Database section @@ -82,13 +82,12 @@ services: - Database__TrustServerCertificate=${Database__TrustServerCertificate:-true} # InternalApi: matches cv-matcher-api appsettings InternalApi section - - InternalApi__ApiKey=${InternalApi__ApiKey:-change-this-internal-key} - - InternalApi__RequireApiKey=${InternalApi__RequireApiKey:-false} + - InternalApi__ApiKey=${CvMatcherApi__InternalApiKey:-change-this-internal-key} + - InternalApi__RequireApiKey=${CvMatcherApi__RequireApiKey:-false} # RagApi: matches cv-matcher-api appsettings RagApi section - # IMPORTANT: this must use the container-internal port, not the host-mapped port. - RagApi__BaseUrl=${RagApi__BaseUrl:-http://rag-api:8080} - - RagApi__InternalApiKey=${RagApi__InternalApiKey:-${InternalApi__ApiKey:-change-this-internal-key}} + - RagApi__InternalApiKey=${RagApi__InternalApiKey:-change-this-internal-key} # Ai: matches cv-matcher-api appsettings Ai section - Ai__Provider=${Ai__Provider:-OpenAI} @@ -116,6 +115,8 @@ services: - Serilog__WriteTo__2__Args__networkCredential__password=${Serilog__WriteTo__2__Args__networkCredential__password:-} - Serilog__WriteTo__2__Args__port=${Serilog__WriteTo__2__Args__port:-587} - Serilog__WriteTo__2__Args__enableSsl=${Serilog__WriteTo__2__Args__enableSsl:-true} + volumes: + - myai_cv_matcher_api_logs:/app/logs networks: - myai-network restart: unless-stopped @@ -129,9 +130,9 @@ services: - cv-matcher-api environment: # ASP.NET - - ASPNETCORE_ENVIRONMENT=${ASPNETCORE_ENVIRONMENT:-Development} + - ASPNETCORE_ENVIRONMENT=${ASPNETCORE_ENVIRONMENT:-Production} - ASPNETCORE_URLS=${ASPNETCORE_URLS:-http://+:8080} - - APP_ENVIRONMENT_NAME=${APP_ENVIRONMENT_NAME:-myai.local} + - APP_ENVIRONMENT_NAME=${APP_ENVIRONMENT_NAME:-myai.production} - LogEnvironmentOnStartup=${LogEnvironmentOnStartup:-true} # Google: matches api appsettings Google section @@ -167,7 +168,7 @@ services: # CvMatcherApi: matches api appsettings CvMatcherApi section - CvMatcherApi__BaseUrl=${CvMatcherApi__BaseUrl:-http://cv-matcher-api:8080} - - CvMatcherApi__InternalApiKey=${CvMatcherApi__InternalApiKey:-${InternalApi__ApiKey:-change-this-internal-key}} + - CvMatcherApi__InternalApiKey=${CvMatcherApi__InternalApiKey:-change-this-internal-key} # CORS: not in the uploaded api appsettings, but used by your API startup config. - Cors__AllowedOrigins__0=${Cors__AllowedOrigins__0:-http://localhost:5000} @@ -186,8 +187,8 @@ services: - Serilog__WriteTo__2__Args__port=${Serilog__WriteTo__2__Args__port:-587} - Serilog__WriteTo__2__Args__enableSsl=${Serilog__WriteTo__2__Args__enableSsl:-true} volumes: - - ../api/logs:/app/logs - - ${FileStorage__Path:-../Files}:/app/Files + - myai_api_logs:/app/logs + - /opt/myai/files:/app/Files networks: - myai-network restart: unless-stopped @@ -202,9 +203,9 @@ services: ports: - "5140:8080" environment: - - ASPNETCORE_ENVIRONMENT=${ASPNETCORE_ENVIRONMENT:-Development} + - ASPNETCORE_ENVIRONMENT=${ASPNETCORE_ENVIRONMENT:-Production} - ASPNETCORE_URLS=${ASPNETCORE_URLS:-http://+:8080} - - APP_ENVIRONMENT_NAME=${APP_ENVIRONMENT_NAME:-myai.local} + - APP_ENVIRONMENT_NAME=${APP_ENVIRONMENT_NAME:-myai.production} networks: - myai-network restart: unless-stopped diff --git a/docker-compose/docker-compose.staging.yml b/docker-compose/docker-compose.staging.yml index 523feb0..af63a13 100644 --- a/docker-compose/docker-compose.staging.yml +++ b/docker-compose/docker-compose.staging.yml @@ -1,14 +1,12 @@ -version: "3.8" - services: rag-api: image: registry.easysoft.ro/apps/myai-rag-api:staging container_name: myai-rag-api environment: # ASP.NET - - ASPNETCORE_ENVIRONMENT=${ASPNETCORE_ENVIRONMENT:-Development} + - ASPNETCORE_ENVIRONMENT=${ASPNETCORE_ENVIRONMENT:-Staging} - ASPNETCORE_URLS=${ASPNETCORE_URLS:-http://+:8080} - - APP_ENVIRONMENT_NAME=${APP_ENVIRONMENT_NAME:-myai.local} + - APP_ENVIRONMENT_NAME=${APP_ENVIRONMENT_NAME:-myai.staging} - LogEnvironmentOnStartup=${LogEnvironmentOnStartup:-true} # Database: matches rag-api appsettings Database section @@ -20,8 +18,8 @@ services: - Database__TrustServerCertificate=${Database__TrustServerCertificate:-true} # InternalApi: matches rag-api appsettings InternalApi section - - InternalApi__ApiKey=${InternalApi__ApiKey:-change-this-internal-key} - - InternalApi__RequireApiKey=${InternalApi__RequireApiKey:-false} + - InternalApi__ApiKey=${RagApi__InternalApiKey:-change-this-internal-key} + - InternalApi__RequireApiKey=${RagApi__RequireApiKey:-false} # Rag: matches rag-api appsettings Rag section - Rag__MaxFileSizeMb=${Rag__MaxFileSizeMb:-8} @@ -55,6 +53,8 @@ services: - Serilog__WriteTo__2__Args__networkCredential__password=${Serilog__WriteTo__2__Args__networkCredential__password:-} - Serilog__WriteTo__2__Args__port=${Serilog__WriteTo__2__Args__port:-587} - Serilog__WriteTo__2__Args__enableSsl=${Serilog__WriteTo__2__Args__enableSsl:-true} + volumes: + - myai_rag_api_logs:/app/logs networks: - myai-network restart: unless-stopped @@ -68,9 +68,9 @@ services: - rag-api environment: # ASP.NET - - ASPNETCORE_ENVIRONMENT=${ASPNETCORE_ENVIRONMENT:-Development} + - ASPNETCORE_ENVIRONMENT=${ASPNETCORE_ENVIRONMENT:-Staging} - ASPNETCORE_URLS=${ASPNETCORE_URLS:-http://+:8080} - - APP_ENVIRONMENT_NAME=${APP_ENVIRONMENT_NAME:-myai.local} + - APP_ENVIRONMENT_NAME=${APP_ENVIRONMENT_NAME:-myai.staging} - LogEnvironmentOnStartup=${LogEnvironmentOnStartup:-true} # Database: matches cv-matcher-api appsettings Database section @@ -82,13 +82,12 @@ services: - Database__TrustServerCertificate=${Database__TrustServerCertificate:-true} # InternalApi: matches cv-matcher-api appsettings InternalApi section - - InternalApi__ApiKey=${InternalApi__ApiKey:-change-this-internal-key} - - InternalApi__RequireApiKey=${InternalApi__RequireApiKey:-false} + - InternalApi__ApiKey=${CvMatcherApi__InternalApiKey:-change-this-internal-key} + - InternalApi__RequireApiKey=${CvMatcherApi__RequireApiKey:-false} # RagApi: matches cv-matcher-api appsettings RagApi section - # IMPORTANT: this must use the container-internal port, not the host-mapped port. - RagApi__BaseUrl=${RagApi__BaseUrl:-http://rag-api:8080} - - RagApi__InternalApiKey=${RagApi__InternalApiKey:-${InternalApi__ApiKey:-change-this-internal-key}} + - RagApi__InternalApiKey=${RagApi__InternalApiKey:-change-this-internal-key} # Ai: matches cv-matcher-api appsettings Ai section - Ai__Provider=${Ai__Provider:-OpenAI} @@ -116,6 +115,8 @@ services: - Serilog__WriteTo__2__Args__networkCredential__password=${Serilog__WriteTo__2__Args__networkCredential__password:-} - Serilog__WriteTo__2__Args__port=${Serilog__WriteTo__2__Args__port:-587} - Serilog__WriteTo__2__Args__enableSsl=${Serilog__WriteTo__2__Args__enableSsl:-true} + volumes: + - myai_cv_matcher_api_logs:/app/logs networks: - myai-network restart: unless-stopped @@ -129,9 +130,9 @@ services: - cv-matcher-api environment: # ASP.NET - - ASPNETCORE_ENVIRONMENT=${ASPNETCORE_ENVIRONMENT:-Development} + - ASPNETCORE_ENVIRONMENT=${ASPNETCORE_ENVIRONMENT:-Staging} - ASPNETCORE_URLS=${ASPNETCORE_URLS:-http://+:8080} - - APP_ENVIRONMENT_NAME=${APP_ENVIRONMENT_NAME:-myai.local} + - APP_ENVIRONMENT_NAME=${APP_ENVIRONMENT_NAME:-myai.staging} - LogEnvironmentOnStartup=${LogEnvironmentOnStartup:-true} # Google: matches api appsettings Google section @@ -167,7 +168,7 @@ services: # CvMatcherApi: matches api appsettings CvMatcherApi section - CvMatcherApi__BaseUrl=${CvMatcherApi__BaseUrl:-http://cv-matcher-api:8080} - - CvMatcherApi__InternalApiKey=${CvMatcherApi__InternalApiKey:-${InternalApi__ApiKey:-change-this-internal-key}} + - CvMatcherApi__InternalApiKey=${CvMatcherApi__InternalApiKey:-change-this-internal-key} # CORS: not in the uploaded api appsettings, but used by your API startup config. - Cors__AllowedOrigins__0=${Cors__AllowedOrigins__0:-http://localhost:5000} @@ -186,8 +187,8 @@ services: - Serilog__WriteTo__2__Args__port=${Serilog__WriteTo__2__Args__port:-587} - Serilog__WriteTo__2__Args__enableSsl=${Serilog__WriteTo__2__Args__enableSsl:-true} volumes: - - ../api/logs:/app/logs - - ${FileStorage__Path:-../Files}:/app/Files + - myai_api_logs:/app/logs + - /opt/myai/files:/app/Files networks: - myai-network restart: unless-stopped @@ -202,9 +203,9 @@ services: ports: - "5140:8080" environment: - - ASPNETCORE_ENVIRONMENT=${ASPNETCORE_ENVIRONMENT:-Development} + - ASPNETCORE_ENVIRONMENT=${ASPNETCORE_ENVIRONMENT:-Staging} - ASPNETCORE_URLS=${ASPNETCORE_URLS:-http://+:8080} - - APP_ENVIRONMENT_NAME=${APP_ENVIRONMENT_NAME:-myai.local} + - APP_ENVIRONMENT_NAME=${APP_ENVIRONMENT_NAME:-myai.staging} networks: - myai-network restart: unless-stopped diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml index 1452e21..ca9775c 100644 --- a/docker-compose/docker-compose.yml +++ b/docker-compose/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.8" - services: rag-api: build: @@ -26,8 +24,8 @@ services: - Database__TrustServerCertificate=${Database__TrustServerCertificate:-true} # InternalApi: matches rag-api appsettings InternalApi section - - InternalApi__ApiKey=${InternalApi__ApiKey:-change-this-internal-key} - - InternalApi__RequireApiKey=${InternalApi__RequireApiKey:-false} + - InternalApi__ApiKey=${RagApi__InternalApiKey:-change-this-internal-key} + - InternalApi__RequireApiKey=${RagApi__RequireApiKey:-false} # Rag: matches rag-api appsettings Rag section - Rag__MaxFileSizeMb=${Rag__MaxFileSizeMb:-8} @@ -61,6 +59,8 @@ services: - Serilog__WriteTo__2__Args__networkCredential__password=${Serilog__WriteTo__2__Args__networkCredential__password:-} - Serilog__WriteTo__2__Args__port=${Serilog__WriteTo__2__Args__port:-587} - Serilog__WriteTo__2__Args__enableSsl=${Serilog__WriteTo__2__Args__enableSsl:-true} + volumes: + - ../api/logs:/app/logs networks: - myai-network restart: unless-stopped @@ -94,13 +94,12 @@ services: - Database__TrustServerCertificate=${Database__TrustServerCertificate:-true} # InternalApi: matches cv-matcher-api appsettings InternalApi section - - InternalApi__ApiKey=${InternalApi__ApiKey:-change-this-internal-key} - - InternalApi__RequireApiKey=${InternalApi__RequireApiKey:-false} + - InternalApi__ApiKey=${CvMatcherApi__InternalApiKey:-change-this-internal-key} + - InternalApi__RequireApiKey=${CvMatcherApi__RequireApiKey:-false} # RagApi: matches cv-matcher-api appsettings RagApi section - # IMPORTANT: this must use the container-internal port, not the host-mapped port. - RagApi__BaseUrl=${RagApi__BaseUrl:-http://rag-api:8080} - - RagApi__InternalApiKey=${RagApi__InternalApiKey:-${InternalApi__ApiKey:-change-this-internal-key}} + - RagApi__InternalApiKey=${RagApi__InternalApiKey:-change-this-internal-key} # Ai: matches cv-matcher-api appsettings Ai section - Ai__Provider=${Ai__Provider:-OpenAI} @@ -128,6 +127,8 @@ services: - Serilog__WriteTo__2__Args__networkCredential__password=${Serilog__WriteTo__2__Args__networkCredential__password:-} - Serilog__WriteTo__2__Args__port=${Serilog__WriteTo__2__Args__port:-587} - Serilog__WriteTo__2__Args__enableSsl=${Serilog__WriteTo__2__Args__enableSsl:-true} + volumes: + - ../api/logs:/app/logs networks: - myai-network restart: unless-stopped @@ -187,7 +188,7 @@ services: # CvMatcherApi: matches api appsettings CvMatcherApi section - CvMatcherApi__BaseUrl=${CvMatcherApi__BaseUrl:-http://cv-matcher-api:8080} - - CvMatcherApi__InternalApiKey=${CvMatcherApi__InternalApiKey:-${InternalApi__ApiKey:-change-this-internal-key}} + - CvMatcherApi__InternalApiKey=${CvMatcherApi__InternalApiKey:-change-this-internal-key} # CORS: not in the uploaded api appsettings, but used by your API startup config. - Cors__AllowedOrigins__0=${Cors__AllowedOrigins__0:-http://localhost:5000}