Files
site11/docker-compose.yml
jungwoo choi 315eeea2ae Step 5: Authentication System & Environment Variables
- Implemented JWT authentication in Console backend
- Added .env file for environment variable management
- Updated docker-compose to use .env variables
- Created authentication endpoints (login/logout/me)
- Added protected route middleware
- Created ARCHITECTURE.md with Kafka as main messaging platform
- Defined Kafka for both events and task queues
- Redis dedicated for caching and session management

Test credentials:
- admin/admin123
- user/user123

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-10 16:36:47 +09:00

100 lines
2.3 KiB
YAML

version: '3.8'
services:
console-frontend:
build:
context: ./console/frontend
dockerfile: Dockerfile
container_name: ${COMPOSE_PROJECT_NAME}_console_frontend
ports:
- "${CONSOLE_FRONTEND_PORT}:80"
networks:
- site11_network
restart: unless-stopped
depends_on:
- console-backend
console-backend:
build:
context: ./console/backend
dockerfile: Dockerfile
container_name: ${COMPOSE_PROJECT_NAME}_console_backend
ports:
- "${CONSOLE_BACKEND_PORT}:8000"
environment:
- ENV=${ENV}
- PORT=8000
- USERS_SERVICE_URL=${USERS_SERVICE_URL}
- JWT_SECRET_KEY=${JWT_SECRET_KEY}
- JWT_ALGORITHM=${JWT_ALGORITHM}
- ACCESS_TOKEN_EXPIRE_MINUTES=${ACCESS_TOKEN_EXPIRE_MINUTES}
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: ${COMPOSE_PROJECT_NAME}_users_backend
environment:
- ENV=${ENV}
- PORT=8000
- MONGODB_URL=${MONGODB_URL}
- DB_NAME=${USERS_DB_NAME}
volumes:
- ./services/users/backend:/app
networks:
- site11_network
restart: unless-stopped
depends_on:
- mongodb
mongodb:
image: mongo:7.0
container_name: ${COMPOSE_PROJECT_NAME}_mongodb
environment:
- MONGO_INITDB_DATABASE=${MONGODB_DATABASE}
ports:
- "${MONGODB_PORT}:27017"
volumes:
- mongodb_data:/data/db
- mongodb_config:/data/configdb
networks:
- site11_network
restart: unless-stopped
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
container_name: ${COMPOSE_PROJECT_NAME}_redis
ports:
- "${REDIS_PORT}:6379"
volumes:
- redis_data:/data
networks:
- site11_network
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
site11_network:
driver: bridge
name: site11_network
volumes:
mongodb_data:
mongodb_config:
redis_data: