-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
90 lines (85 loc) · 2.89 KB
/
Copy pathdocker-compose.yml
File metadata and controls
90 lines (85 loc) · 2.89 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
# corparius, turnkey: `docker compose up -d` serves the operator console on
# http://127.0.0.1:8600 next to a local Ollama. Optional profiles:
# --profile loop also runs the company loop in the background
# --profile extras Postgres (pgvector) and n8n for advanced setups
services:
console:
build: .
container_name: corparius-console
command: ["python", "-m", "corparius.cli", "ui", "--host", "0.0.0.0", "--port", "8600"]
# No env_file here on purpose. `env_file` injects every line of .env into the
# real process environment, which is the highest-precedence layer, so it
# would outrank everything saved from the console and leave the settings
# screen read-only. The .env mount below is read directly by corparius/cfg.py as
# the lower layer instead. Entries under `environment:` still win, and the
# console labels them as set by the environment.
environment:
CORP_OLLAMA_URL: http://ollama:11434
ports:
- "127.0.0.1:8600:8600" # localhost only; put a reverse proxy in front to expose it
volumes:
- ./companies:/app/companies
- ./.env:/app/.env # read as the lowest layer; see corparius/cfg.py
- corparius_data:/app/data
depends_on:
- ollama
restart: unless-stopped
loop:
build: .
container_name: corparius-loop
profiles: ["loop"]
command: ["python", "-m", "corparius.cli", "run", "--company", "example", "--loop"]
environment:
CORP_OLLAMA_URL: http://ollama:11434
volumes:
- ./companies:/app/companies
- ./.env:/app/.env # same layering as the console; see corparius/cfg.py
- corparius_data:/app/data
depends_on:
- ollama
restart: unless-stopped
ollama:
image: ollama/ollama:latest
container_name: corparius-ollama
ports:
- "127.0.0.1:11434:11434"
volumes:
- ollama_models:/root/.ollama
restart: unless-stopped
# For GPU: install the NVIDIA container toolkit and uncomment.
# deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# count: all
# capabilities: [gpu]
# Vector-capable Postgres for when you outgrow SQLite.
postgres:
image: pgvector/pgvector:pg16
container_name: corparius-postgres
profiles: ["extras"]
environment:
POSTGRES_USER: corparius
POSTGRES_PASSWORD: change_me
POSTGRES_DB: corparius
volumes:
- corparius_pg:/var/lib/postgresql/data
restart: unless-stopped
# n8n hosts the human-in-the-loop approval flows (Slack, Telegram, email).
n8n:
image: n8nio/n8n:latest
container_name: corparius-n8n
profiles: ["extras"]
ports:
- "127.0.0.1:5678:5678"
environment:
N8N_SECURE_COOKIE: "false"
volumes:
- n8n_data:/home/node/.n8n
restart: unless-stopped
volumes:
corparius_data:
corparius_pg:
ollama_models:
n8n_data: