services: # 0. PostgreSQL Database postgres: image: postgres:15-alpine container_name: kuvia-postgres ports: - "5434:5432" environment: - POSTGRES_USER=kuvia - POSTGRES_PASSWORD=kuvia_secret - POSTGRES_DB=kuvia_db volumes: - kuvia-postgres-data:/var/lib/postgresql/data networks: - kuvia-network healthcheck: test: [ "CMD-SHELL", "pg_isready -U kuvia -d kuvia_db" ] interval: 5s timeout: 5s retries: 5 # 0.1 pgAdmin (Optional - Database Management UI) pgadmin: image: dpage/pgadmin4 container_name: kuvia-pgadmin ports: - "5051:80" environment: - PGADMIN_DEFAULT_EMAIL=admin@kuvia.com - PGADMIN_DEFAULT_PASSWORD=admin123 depends_on: - postgres networks: - kuvia-network # 0.2 Redis (Caching Layer) redis: image: redis:7-alpine container_name: kuvia-redis ports: - "6379:6379" volumes: - kuvia-redis-data:/data networks: - kuvia-network healthcheck: test: [ "CMD", "redis-cli", "ping" ] interval: 5s timeout: 3s retries: 5 command: redis-server --appendonly yes # 0.3 Meilisearch (Fast Product Search) meilisearch: image: getmeili/meilisearch:v1.6 container_name: kuvia-meilisearch ports: - "7700:7700" environment: - MEILI_MASTER_KEY=kuvia_search_master_key_2026 - MEILI_ENV=development volumes: - kuvia-meili-data:/meili_data networks: - kuvia-network healthcheck: test: [ "CMD", "curl", "-f", "http://localhost:7700/health" ] interval: 10s timeout: 5s retries: 5 # 1. Identity Service (Java) identity-auth: build: ./services-java/identity-auth ports: - "8081:8081" environment: - SERVER_PORT=8081 - SPRING_DATASOURCE_URL=jdbc:postgresql://postgres:5432/kuvia_db - SPRING_DATASOURCE_USERNAME=kuvia - SPRING_DATASOURCE_PASSWORD=kuvia_secret - SPRING_DATASOURCE_DRIVER_CLASS_NAME=org.postgresql.Driver - SPRING_JPA_DATABASE_PLATFORM=org.hibernate.dialect.PostgreSQLDialect - SPRING_JPA_HIBERNATE_DDL_AUTO=update depends_on: postgres: condition: service_healthy networks: - kuvia-network develop: watch: - action: rebuild path: ./services-java/identity-auth/src - action: rebuild path: ./services-java/identity-auth/pom.xml # 2. Product Service (Go) product-catalog: build: ./services-go/product-catalog ports: - "8082:8082" environment: - GIN_MODE=release - DB_HOST=postgres - DB_PORT=5432 - DB_USER=kuvia - DB_PASSWORD=kuvia_secret - DB_NAME=kuvia_db # Redis Cache - REDIS_HOST=redis - REDIS_PORT=6379 # Meilisearch - MEILI_HOST=http://meilisearch:7700 - MEILI_MASTER_KEY=kuvia_search_master_key_2026 depends_on: postgres: condition: service_healthy redis: condition: service_healthy meilisearch: condition: service_healthy networks: - kuvia-network develop: watch: - action: rebuild path: ./services-go/product-catalog ignore: - "*.db" - action: rebuild path: ./services-go/product-catalog/go.mod # 3. Order Service (Java) order-processing: build: ./services-java/order-processing ports: - "8083:8083" environment: - SERVER_PORT=8083 - SPRING_DATASOURCE_URL=jdbc:postgresql://postgres:5432/kuvia_db - SPRING_DATASOURCE_USERNAME=kuvia - SPRING_DATASOURCE_PASSWORD=kuvia_secret - SPRING_DATASOURCE_DRIVER_CLASS_NAME=org.postgresql.Driver - SPRING_JPA_DATABASE_PLATFORM=org.hibernate.dialect.PostgreSQLDialect - SPRING_JPA_HIBERNATE_DDL_AUTO=update depends_on: postgres: condition: service_healthy networks: - kuvia-network develop: watch: - action: rebuild path: ./services-java/order-processing/src - action: rebuild path: ./services-java/order-processing/pom.xml # 4. Sentiment Service (Python) review-sentiment: build: ./services-python/review-sentiment ports: - "8084:8084" volumes: - ./services-python/review-sentiment:/app command: uvicorn main:app --host 0.0.0.0 --port 8084 --reload networks: - kuvia-network develop: watch: - action: sync path: ./services-python/review-sentiment target: /app ignore: - __pycache__/ - action: rebuild path: ./services-python/review-sentiment/requirements.txt # 5. Inventory Service (Go) inventory-shipping: build: ./services-go/inventory-shipping ports: - "8085:8085" environment: - GIN_MODE=release - DB_HOST=postgres - DB_PORT=5432 - DB_USER=kuvia - DB_PASSWORD=kuvia_secret - DB_NAME=kuvia_db depends_on: postgres: condition: service_healthy networks: - kuvia-network develop: watch: - action: rebuild path: ./services-go/inventory-shipping ignore: - "*.db" - action: rebuild path: ./services-go/inventory-shipping/go.mod # 6. Recommendation Service (Python) recommendation-engine: build: ./services-python/recommendation-engine ports: - "8086:8086" volumes: - ./services-python/recommendation-engine:/app command: uvicorn main:app --host 0.0.0.0 --port 8086 --reload networks: - kuvia-network develop: watch: - action: sync path: ./services-python/recommendation-engine target: /app ignore: - __pycache__/ - action: rebuild path: ./services-python/recommendation-engine/requirements.txt # 7. Frontend (Bun + React) frontend: platform: linux/arm64 build: ./frontend ports: - "3001:3001" volumes: - ./frontend/src:/app/src - ./frontend/public:/app/public - ./frontend/index.html:/app/index.html - /app/node_modules environment: - NODE_ENV=development - AUTH_SERVICE_URL=http://identity-auth:8081/auth - PRODUCT_SERVICE_URL=http://product-catalog:8082/products - ORDER_SERVICE_URL=http://order-processing:8083/orders - SENTIMENT_SERVICE_URL=http://review-sentiment:8084 - INVENTORY_SERVICE_URL=http://inventory-shipping:8085/inventory - SHIPPING_SERVICE_URL=http://inventory-shipping:8085/shipping - RECOMMEND_SERVICE_URL=http://recommendation-engine:8086/recommend networks: - kuvia-network develop: watch: - action: sync path: ./frontend/src target: /app/src - action: sync path: ./frontend/public target: /app/public - action: rebuild path: ./frontend/package.json networks: kuvia-network: driver: bridge volumes: kuvia-postgres-data: kuvia-redis-data: kuvia-meili-data: