services: identity-service: build: . ports: - "3000:3000" environment: # Database - DATABASE_URL=postgresql://postgres:password@postgres:5432/rwa_identity?schema=public # JWT - JWT_SECRET=your-super-secret-jwt-key-change-in-production - JWT_ACCESS_EXPIRES_IN=2h - JWT_REFRESH_EXPIRES_IN=30d # Redis - REDIS_HOST=redis - REDIS_PORT=6379 - REDIS_PASSWORD= - REDIS_DB=0 # Kafka - KAFKA_BROKERS=kafka:29092 - KAFKA_CLIENT_ID=identity-service - KAFKA_GROUP_ID=identity-service-group # App - APP_PORT=3000 - APP_ENV=production # Blockchain - WALLET_ENCRYPTION_SALT=rwa-wallet-salt-change-in-production # MPC Service - MPC_SERVICE_URL=http://mpc-service:3001 - MPC_MODE=local # Backup Service - BACKUP_SERVICE_URL=http://backup-service:3002 - BACKUP_SERVICE_ENABLED=false - SERVICE_JWT_SECRET=your-service-jwt-secret-change-in-production depends_on: postgres: condition: service_healthy redis: condition: service_healthy kafka: condition: service_started healthcheck: test: ["CMD", "wget", "-q", "--spider", "http://localhost:3000/health"] interval: 30s timeout: 10s retries: 3 start_period: 40s restart: unless-stopped postgres: image: postgres:16-alpine environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=password - POSTGRES_DB=rwa_identity ports: - "5432:5432" volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 5s timeout: 5s retries: 10 restart: unless-stopped redis: image: redis:7-alpine ports: - "6379:6379" volumes: - redis_data:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 5s retries: 10 restart: unless-stopped zookeeper: image: confluentinc/cp-zookeeper:7.5.0 environment: ZOOKEEPER_CLIENT_PORT: 2181 ZOOKEEPER_TICK_TIME: 2000 healthcheck: test: ["CMD", "nc", "-z", "localhost", "2181"] interval: 10s timeout: 5s retries: 5 restart: unless-stopped kafka: image: confluentinc/cp-kafka:7.5.0 depends_on: zookeeper: condition: service_healthy ports: - "9092:9092" environment: KAFKA_BROKER_ID: 1 KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092,PLAINTEXT_INTERNAL://kafka:29092 KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_INTERNAL:PLAINTEXT KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092,PLAINTEXT_INTERNAL://0.0.0.0:29092 KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT_INTERNAL KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true" healthcheck: test: ["CMD", "kafka-topics", "--bootstrap-server", "localhost:9092", "--list"] interval: 30s timeout: 10s retries: 5 start_period: 30s restart: unless-stopped volumes: postgres_data: redis_data: