version: "3.8" services: user-login-account: build: context: ../.. dockerfile: services/user-service/user-login-account/Dockerfile container_name: user-login-account environment: - RUST_LOG=info - DATABASE_URL=postgres://postgres:postgres@user-db:5432/user-db - REDIS_URL=redis://user-redis:6379/0 - SERVICE_NAME=user-login-account - SERVICE_PORT=8080 - JWT_SECRET=${JWT_SECRET:-dev-secret-key} ports: - "8001:8080" depends_on: user-db: condition: service_healthy user-redis: condition: service_healthy networks: - user-network restart: unless-stopped healthcheck: test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:8080/health"] interval: 30s timeout: 10s retries: 3 user-register-account: build: context: ../.. dockerfile: services/user-service/user-register-account/Dockerfile container_name: user-register-account environment: - RUST_LOG=info - DATABASE_URL=postgres://postgres:postgres@user-db:5432/user-db - REDIS_URL=redis://user-redis:6379/0 - SERVICE_NAME=user-register-account - SERVICE_PORT=8080 ports: - "8002:8080" depends_on: user-db: condition: service_healthy user-redis: condition: service_healthy networks: - user-network restart: unless-stopped healthcheck: test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:8080/health"] interval: 30s timeout: 10s retries: 3 user-db: image: postgres:18.3-alpine3.23 container_name: user-db environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=postgres - POSTGRES_DB=user-db volumes: - user-postgres-data:/var/lib/postgresql/data - ./migrations:/docker-entrypoint-initdb.d:ro ports: - "5432:5432" networks: - user-network restart: unless-stopped healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres -d user-db"] interval: 10s timeout: 5s retries: 5 user-redis: image: redis:8.6.2-alpine container_name: user-redis volumes: - user-redis-data:/data ports: - "6379:6379" networks: - user-network restart: unless-stopped healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 10s timeout: 5s retries: 5 networks: user-network: driver: bridge volumes: user-postgres-data: name: user-postgres-data user-redis-data: name: user-redis-data