chore(docker): Migrate IAM service configuration to main docker-compose file
- Added IAM service configuration to the local docker-compose.yml for streamlined deployment. - Removed the separate docker-compose.yml file from the IAM service directory to consolidate service definitions.
This commit is contained in:
@@ -158,6 +158,9 @@ services:
|
||||
|
||||
# IAM Service .NET - Identity and Access Management (Duende IdentityServer)
|
||||
iam-service-net:
|
||||
build:
|
||||
context: ../../services/iam-service-net
|
||||
dockerfile: Dockerfile
|
||||
image: goodgo/iam-service-net:latest
|
||||
container_name: iam-service-net-local
|
||||
env_file:
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
version: '3.8'
|
||||
|
||||
# EN: Docker Compose for local development with external services
|
||||
# VI: Docker Compose cho phát triển local với dịch vụ bên ngoài
|
||||
|
||||
services:
|
||||
iamservice-api:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: iamservice-api
|
||||
ports:
|
||||
- "${API_PORT:-5001}:8080"
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
# EN: Override for container environment
|
||||
# VI: Ghi đè cho môi trường container
|
||||
- ASPNETCORE_ENVIRONMENT=${ASPNETCORE_ENVIRONMENT:-Development}
|
||||
- ASPNETCORE_URLS=http://+:8080
|
||||
# EN: Database - Neon PostgreSQL
|
||||
# VI: Cơ sở dữ liệu - Neon PostgreSQL
|
||||
- ConnectionStrings__DefaultConnection=${DATABASE_URL}
|
||||
# EN: Redis Cache
|
||||
# VI: Cache Redis
|
||||
- Redis__Host=${REDIS_HOST}
|
||||
- Redis__Port=${REDIS_PORT}
|
||||
- Redis__Password=${REDIS_PASSWORD}
|
||||
- Redis__Database=${REDIS_DATABASE:-0}
|
||||
# EN: JWT Configuration
|
||||
# VI: Cấu hình JWT
|
||||
- Jwt__Secret=${JWT_SECRET}
|
||||
- Jwt__Issuer=${JWT_ISSUER}
|
||||
- Jwt__Audience=${JWT_AUDIENCE}
|
||||
- Jwt__AccessTokenExpiryMinutes=${JWT_ACCESS_TOKEN_EXPIRY_MINUTES:-15}
|
||||
- Jwt__RefreshTokenExpiryDays=${JWT_REFRESH_TOKEN_EXPIRY_DAYS:-7}
|
||||
# EN: Features
|
||||
# VI: Tính năng
|
||||
- Features__SwaggerEnabled=${FEATURE_SWAGGER_ENABLED:-true}
|
||||
- Features__DetailedErrors=${FEATURE_DETAILED_ERRORS:-true}
|
||||
networks:
|
||||
- iamservice-network
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8080/health/live"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 15s
|
||||
restart: unless-stopped
|
||||
|
||||
networks:
|
||||
iamservice-network:
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user