- Introduced a new social-service in the Docker Compose configuration for local development, including build context, environment variables, and health checks. - Updated architecture documentation to reflect the new storage service structure and its components, including user storage quotas and file management. - Enhanced README files to provide clearer instructions on service setup, configuration, and API endpoints for file storage management. - Implemented caching mechanisms in the IAM service client for improved performance and reduced latency in user information retrieval. - Updated appsettings for development to include caching settings for IAM service interactions.
74 lines
1.6 KiB
YAML
74 lines
1.6 KiB
YAML
version: '3.8'
|
|
|
|
# EN: Docker Compose for Chat Service local development
|
|
# VI: Docker Compose cho Chat Service phát triển local
|
|
|
|
services:
|
|
chatservice-api:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: chatservice-api
|
|
ports:
|
|
- "5003:8080"
|
|
environment:
|
|
- ASPNETCORE_ENVIRONMENT=Development
|
|
- DATABASE_URL=Host=postgres;Port=5432;Database=chatservice_db;Username=postgres;Password=postgres
|
|
- REDIS_HOST=redis
|
|
- REDIS_PORT=6379
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
networks:
|
|
- chatservice-network
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8080/health/live"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 10s
|
|
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: chatservice-postgres
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: chatservice_db
|
|
ports:
|
|
- "5435:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
networks:
|
|
- chatservice-network
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: chatservice-redis
|
|
ports:
|
|
- "6382:6379"
|
|
volumes:
|
|
- redis_data:/data
|
|
networks:
|
|
- chatservice-network
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
volumes:
|
|
postgres_data:
|
|
redis_data:
|
|
|
|
networks:
|
|
chatservice-network:
|
|
driver: bridge
|