-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
58 lines (53 loc) · 1.78 KB
/
docker-compose.yml
File metadata and controls
58 lines (53 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
services:
kafka:
image: confluentinc/cp-kafka:7.6.1
ports:
- "9092:9092"
- "29092:29092"
env_file:
- .env
environment:
KAFKA_CLUSTER_ID: ${KAFKA_CLUSTER_ID}
CLUSTER_ID: ${KAFKA_CLUSTER_ID}
KAFKA_PROCESS_ROLES: broker,controller
KAFKA_NODE_ID: 1
KAFKA_CONTROLLER_QUORUM_VOTERS: 1@kafka:9093
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092,CONTROLLER://0.0.0.0:9093,PLAINTEXT_HOST://0.0.0.0:29092
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:29092
KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_LOG_DIRS: /var/lib/kafka/data
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
healthcheck:
test: ["CMD-SHELL", "kafka-broker-api-versions --bootstrap-server localhost:9092 >/dev/null 2>&1"]
interval: 5s
timeout: 3s
retries: 30
start_period: 10s
api:
image: ai-sleep-service:latest
build:
context: .
dockerfile: Dockerfile
env_file:
- .env
environment:
DB_HOST: host.docker.internal
DB_PORT: 3307
ports:
- "8080:8080"
depends_on:
kafka:
condition: service_healthy
command: ["uvicorn", "app.api.main:app", "--host", "0.0.0.0", "--port", "8080"]
extra_hosts:
- "host.docker.internal:host-gateway"
# Removed separate worker containers; workers run inside API process
# Aggregator runs inside API process as background consumers
networks:
default:
name: ai-sleep-net