config: Update service connection strings and URLs for containerized environment and refine Dockerfile build process.
This commit is contained in:
@@ -9,8 +9,8 @@ COPY ["src/PromotionService.Domain/PromotionService.Domain.csproj", "src/Promoti
|
||||
COPY ["src/PromotionService.Infrastructure/PromotionService.Infrastructure.csproj", "src/PromotionService.Infrastructure/"]
|
||||
COPY ["Directory.Build.props", "./"]
|
||||
|
||||
# EN: Restore dependencies
|
||||
# VI: Khôi phục dependencies
|
||||
# EN: Restore dependencies (full restore, no --no-restore later)
|
||||
# VI: Khôi phục dependencies (restore đầy đủ, không dùng --no-restore sau)
|
||||
RUN dotnet restore "src/PromotionService.API/PromotionService.API.csproj"
|
||||
|
||||
# EN: Copy all source code
|
||||
@@ -20,11 +20,11 @@ COPY src/ ./src/
|
||||
# EN: Build the application
|
||||
# VI: Build ứng dụng
|
||||
WORKDIR "/src/src/PromotionService.API"
|
||||
RUN dotnet build "PromotionService.API.csproj" -c Release -o /app/build --no-restore
|
||||
RUN dotnet build "PromotionService.API.csproj" -c Release -o /app/build
|
||||
|
||||
# Publish stage / Giai đoạn publish
|
||||
FROM build AS publish
|
||||
RUN dotnet publish "PromotionService.API.csproj" -c Release -o /app/publish /p:UseAppHost=false --no-restore
|
||||
RUN dotnet publish "PromotionService.API.csproj" -c Release -o /app/publish /p:UseAppHost=false
|
||||
|
||||
# Runtime stage / Giai đoạn runtime
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS final
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger",
|
||||
"applicationUrl": "http://localhost:5000",
|
||||
"applicationUrl": "http://localhost:5008",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
}
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"DefaultConnection": "Host=localhost;Port=5432;Database=promotion_service_dev;Username=postgres;Password=postgres"
|
||||
"DefaultConnection": "Host=ep-holy-glitter-a4hongg7-pooler.us-east-1.aws.neon.tech;Port=5432;Database=promotion_service;Username=neondb_owner;Password=npg_Ssfy6HKO0cXI;SSL Mode=Require"
|
||||
},
|
||||
"WalletService": {
|
||||
"BaseUrl": "http://localhost:5003",
|
||||
|
||||
@@ -30,25 +30,25 @@
|
||||
]
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"DefaultConnection": "Host=localhost;Port=5432;Database=promotion_service;Username=postgres;Password=postgres"
|
||||
"DefaultConnection": "Host=ep-holy-glitter-a4hongg7-pooler.us-east-1.aws.neon.tech;Port=5432;Database=promotion_service;Username=neondb_owner;Password=npg_Ssfy6HKO0cXI;SSL Mode=Require"
|
||||
},
|
||||
"WalletService": {
|
||||
"BaseUrl": "http://localhost:5003",
|
||||
"BaseUrl": "http://wallet-service-net:8080",
|
||||
"TimeoutSeconds": 30
|
||||
},
|
||||
"IamService": {
|
||||
"BaseUrl": "http://localhost:5001",
|
||||
"BaseUrl": "http://iam-service-net:8080",
|
||||
"ServiceName": "promotion-service"
|
||||
},
|
||||
"RabbitMQ": {
|
||||
"Host": "localhost",
|
||||
"Host": "rabbitmq",
|
||||
"Port": 5672,
|
||||
"Username": "guest",
|
||||
"Password": "guest",
|
||||
"VirtualHost": "/"
|
||||
},
|
||||
"Jwt": {
|
||||
"Authority": "http://localhost:5001",
|
||||
"Authority": "http://iam-service-net:8080",
|
||||
"Audience": "goodgo-api",
|
||||
"RequireHttpsMetadata": false,
|
||||
"Secret": "your-super-secret-key-min-32-characters",
|
||||
@@ -57,7 +57,7 @@
|
||||
"RefreshTokenExpiryDays": 7
|
||||
},
|
||||
"Redis": {
|
||||
"ConnectionString": "localhost:6379"
|
||||
"ConnectionString": "redis:6379"
|
||||
},
|
||||
"AllowedHosts": "*"
|
||||
}
|
||||
Reference in New Issue
Block a user