mirror of
https://gitea.gofwd.group/Forward_Group/ballistic-builder-spring.git
synced 2026-01-21 01:01:05 -05:00
fixing cors for prod
This commit is contained in:
@@ -19,7 +19,6 @@ RUN mvn clean package -DskipTests
|
||||
# Use a smaller Java Runtime Environment (JRE) image for a smaller footprint
|
||||
FROM eclipse-temurin:21-jre
|
||||
|
||||
ENV SPRING_PROFILES_ACTIVE=prod
|
||||
# Set the working directory in the final image
|
||||
WORKDIR /app
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@ services:
|
||||
- SPRING_DATASOURCE_URL=jdbc:postgresql://ash.gofwd.group:5433/ss_builder
|
||||
- SPRING_DATASOURCE_USERNAME=dba
|
||||
- SPRING_DATASOURCE_PASSWORD=!@#Qwerty
|
||||
- SPRING_PROFILES_ACTIVE=prod
|
||||
- AI_ENRICHMENT_PROVIDER=off
|
||||
- SPRING_PROFILES_ACTIVE=openai,prod
|
||||
- AI_ENRICHMENT_PROVIDER=openai
|
||||
networks:
|
||||
- app-network
|
||||
|
||||
|
||||
@@ -33,7 +33,8 @@ public class CorsConfig {
|
||||
"https://localhost:3000/gunbuilder",
|
||||
"http://localhost:3000/gunbuilder",
|
||||
"https://localhost:3000/builder",
|
||||
"http://localhost:3000/builder"
|
||||
"http://localhost:3000/builder",
|
||||
"https://battl.builders"
|
||||
));
|
||||
|
||||
// Allow all headers
|
||||
|
||||
@@ -10,6 +10,7 @@ import group.goforward.battlbuilder.enrichment.repo.ProductEnrichmentRepository;
|
||||
import group.goforward.battlbuilder.model.Product;
|
||||
import group.goforward.battlbuilder.repos.ProductRepository;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
@@ -17,6 +18,11 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
@ConditionalOnProperty(
|
||||
name = "ai.enrichment.provider",
|
||||
havingValue = "openai",
|
||||
matchIfMissing = false
|
||||
)
|
||||
public class AiEnrichmentOrchestrator {
|
||||
|
||||
private final EnrichmentModelClient modelClient;
|
||||
|
||||
@@ -79,6 +79,6 @@ app.beta.invite.tokenMinutes=30
|
||||
ai.minConfidence=0.75
|
||||
ai.openai.apiKey=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
|
||||
ai.openai.model=gpt-4.1-mini
|
||||
ai.enrichment.provider=off
|
||||
ai.enrichment.provider=openai
|
||||
|
||||
spring.jackson.serialization.fail-on-empty-beans=false
|
||||
Reference in New Issue
Block a user