Step 2: Add Users microservice with API Gateway routing
- Created Users service with full CRUD operations - Updated Console to act as API Gateway for Users service - Implemented service-to-service communication - Added service health monitoring in Console - Docker Compose now manages both services Services running: - Console (API Gateway): http://localhost:8011 - Users service: Internal network only Test endpoints: - Status: curl http://localhost:8011/api/status - Users: curl http://localhost:8011/api/users/users 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -11,11 +11,28 @@ services:
|
||||
environment:
|
||||
- ENV=development
|
||||
- PORT=8000
|
||||
- USERS_SERVICE_URL=http://users-backend:8000
|
||||
volumes:
|
||||
- ./console/backend:/app
|
||||
networks:
|
||||
- site11_network
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- users-backend
|
||||
|
||||
users-backend:
|
||||
build:
|
||||
context: ./services/users/backend
|
||||
dockerfile: Dockerfile
|
||||
container_name: site11_users_backend
|
||||
environment:
|
||||
- ENV=development
|
||||
- PORT=8000
|
||||
volumes:
|
||||
- ./services/users/backend:/app
|
||||
networks:
|
||||
- site11_network
|
||||
restart: unless-stopped
|
||||
|
||||
networks:
|
||||
site11_network:
|
||||
|
||||
Reference in New Issue
Block a user