-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
101 lines (91 loc) · 2.62 KB
/
docker-compose.yml
File metadata and controls
101 lines (91 loc) · 2.62 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
version: '3.8'
services:
# 1. MESSAGE BROKER / JOB QUEUE BACKEND
# Redis is used by ARQ as the durable job queue backend.
redis:
image: redis:alpine
container_name: aw_redis
ports:
- "6379:6379"
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
# 2. API BACKEND (Hexagonal Adapter)
# Serves HTTP requests; (after refactor) enqueues ARQ jobs in Redis.
backend:
build:
context: .
dockerfile: docker/Dockerfile.backend
container_name: aw_backend
env_file: .env
environment:
- REDIS_URL=redis://redis:6379/0
# Container absolute paths (override Windows/local .env)
- FILESYSTEM_REPO_PATH=/app
- GF_LIB_PATH=/app/gf-rgl
# IMPORTANT: current Settings.PGF_PATH honors AW_PGF_PATH, not PGF_PATH
- AW_PGF_PATH=/app/gf/semantik_architect.pgf
# Keep queue name explicit for ARQ WorkerSettings
- REDIS_QUEUE_NAME=architect_tasks
ports:
- "8000:8000"
volumes:
- .:/app
depends_on:
redis:
condition: service_healthy
command: uvicorn app.adapters.api.main:create_app --host 0.0.0.0 --port 8000 --reload --factory
restart: unless-stopped
# 3. ASYNC WORKER (Hexagonal Adapter)
# Runs ARQ and consumes jobs from the Redis job queue (NOT Pub/Sub channels).
worker:
build:
context: .
dockerfile: docker/Dockerfile.worker
container_name: aw_worker
env_file: .env
environment:
- REDIS_URL=redis://redis:6379/0
# Match Backend paths exactly
- FILESYSTEM_REPO_PATH=/app
- GF_LIB_PATH=/app/gf-rgl
- AW_PGF_PATH=/app/gf/semantik_architect.pgf
# Must match WorkerSettings.queue_name
- REDIS_QUEUE_NAME=architect_tasks
volumes:
- .:/app
depends_on:
redis:
condition: service_healthy
command: arq app.workers.worker.WorkerSettings --watch app
restart: unless-stopped
# 4. FRONTEND (UI Layer)
frontend:
build:
context: .
dockerfile: docker/Dockerfile.frontend
container_name: aw_frontend
env_file: .env
environment:
- NEXT_PUBLIC_ARCHITECT_API_BASE_URL=/semantik_architect/api/v1
depends_on:
- backend
ports:
- "3000:3000"
restart: unless-stopped
# 5. REVERSE PROXY (Primary Entrypoint)
# ACCESS: http://localhost:4000/semantik_architect/
nginx:
image: nginx:alpine
container_name: aw_nginx
depends_on:
- frontend
- backend
volumes:
- ./deploy/nginx.conf:/etc/nginx/conf.d/default.conf:ro
ports:
- "4000:80"
restart: unless-stopped