- Added endpoints for sending and confirming email verification, enhancing user account security. - Integrated two-factor authentication (2FA) with TOTP support, including enabling, verifying, and disabling 2FA. - Implemented social login functionality for Google and Facebook, allowing users to authenticate using their existing accounts. - Updated dependency injection to include services for email, 2FA, and social login. - Enhanced documentation to reflect new features and usage examples for email verification and 2FA.
103 lines
2.4 KiB
YAML
103 lines
2.4 KiB
YAML
version: '3.8'
|
|
|
|
# EN: Docker Compose for local development
|
|
# VI: Docker Compose cho phát triển local
|
|
|
|
services:
|
|
storage-api:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: storage-service-api
|
|
ports:
|
|
- "5002:8080"
|
|
environment:
|
|
- ASPNETCORE_ENVIRONMENT=Development
|
|
- DATABASE_URL=Host=postgres;Port=5432;Database=storage_db;Username=postgres;Password=postgres
|
|
- REDIS_URL=redis:6379
|
|
- Storage__Provider=minio
|
|
- Storage__DefaultBucket=storage
|
|
- Storage__MinIO__Endpoint=minio:9000
|
|
- Storage__MinIO__AccessKey=minioadmin
|
|
- Storage__MinIO__SecretKey=minioadmin
|
|
- Storage__MinIO__UseSSL=false
|
|
- IamService__BaseUrl=http://iam-service:5001
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
minio:
|
|
condition: service_healthy
|
|
networks:
|
|
- storage-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: storage-postgres
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: storage_db
|
|
ports:
|
|
- "5433:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
networks:
|
|
- storage-network
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: storage-redis
|
|
ports:
|
|
- "6380:6379"
|
|
volumes:
|
|
- redis_data:/data
|
|
networks:
|
|
- storage-network
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
minio:
|
|
image: minio/minio:latest
|
|
container_name: storage-minio
|
|
command: server /data --console-address ":9001"
|
|
environment:
|
|
MINIO_ROOT_USER: minioadmin
|
|
MINIO_ROOT_PASSWORD: minioadmin
|
|
ports:
|
|
- "9000:9000" # API port
|
|
- "9001:9001" # Console port
|
|
volumes:
|
|
- minio_data:/data
|
|
networks:
|
|
- storage-network
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
volumes:
|
|
postgres_data:
|
|
redis_data:
|
|
minio_data:
|
|
|
|
networks:
|
|
storage-network:
|
|
driver: bridge
|