-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.production.yml
More file actions
104 lines (98 loc) · 3.72 KB
/
Copy pathdocker-compose.production.yml
File metadata and controls
104 lines (98 loc) · 3.72 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
102
103
104
name: agent-huddle
services:
postgres:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB:-agent_huddle}
POSTGRES_USER: ${POSTGRES_USER:-agent_huddle}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD in .env.production.local}
volumes:
- agent_huddle_postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 10
redis:
image: redis:7-alpine
restart: unless-stopped
command: ["redis-server", "--appendonly", "yes"]
volumes:
- agent_huddle_redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 10
api:
build:
context: ./api
dockerfile: Dockerfile
restart: unless-stopped
environment:
APP_ENV: ${APP_ENV:-production}
APP_NAME: ${APP_NAME:-Agent Huddle}
DATABASE_URL: ${DATABASE_URL:?Set DATABASE_URL in .env.production.local}
REDIS_URL: ${REDIS_URL:-redis://redis:6379/0}
ORCHESTRATOR_MODE: ${ORCHESTRATOR_MODE:-inline}
SECRET_KEY: ${SECRET_KEY:?Set SECRET_KEY in .env.production.local}
ENCRYPTION_KEY: ${ENCRYPTION_KEY:?Set ENCRYPTION_KEY in .env.production.local}
CORS_ORIGINS: ${CORS_ORIGINS:-https://discuss.219214.xyz}
DEFAULT_BUILTIN_PROVIDER_ENABLED: ${DEFAULT_BUILTIN_PROVIDER_ENABLED:-false}
DEFAULT_OPENAI_API_KEY: ${DEFAULT_OPENAI_API_KEY:-}
DEFAULT_OPENAI_BASE_URL: ${DEFAULT_OPENAI_BASE_URL:-}
DEFAULT_OPENAI_MODEL: ${DEFAULT_OPENAI_MODEL:-}
REQUEST_TIMEOUT_SEC: ${REQUEST_TIMEOUT_SEC:-180}
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
expose:
- "8000"
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/healthz', timeout=5).read()"]
interval: 10s
timeout: 5s
retries: 12
start_period: 20s
web:
build:
context: ./web
dockerfile: Dockerfile
args:
NEXT_PUBLIC_API_BASE_URL: ${NEXT_PUBLIC_API_BASE_URL:-/api}
restart: unless-stopped
environment:
NEXT_PUBLIC_API_BASE_URL: ${NEXT_PUBLIC_API_BASE_URL:-/api}
INTERNAL_API_BASE_URL: ${INTERNAL_API_BASE_URL:-http://api:8000}
depends_on:
api:
condition: service_healthy
expose:
- "3000"
networks:
- default
- app-network
labels:
- "traefik.enable=true"
- "traefik.docker.network=app-network"
- "traefik.http.routers.agent-huddle.rule=Host(`${PUBLIC_HOST:-discuss.219214.xyz}`)"
- "traefik.http.routers.agent-huddle.entrypoints=websecure"
- "traefik.http.routers.agent-huddle.tls=true"
- "traefik.http.routers.agent-huddle.service=agent-huddle-web"
- "traefik.http.routers.agent-huddle.middlewares=agent-huddle-security-headers,agent-huddle-compress"
- "traefik.http.services.agent-huddle-web.loadbalancer.server.port=3000"
- "traefik.http.middlewares.agent-huddle-compress.compress=true"
- "traefik.http.middlewares.agent-huddle-security-headers.headers.stsSeconds=31536000"
- "traefik.http.middlewares.agent-huddle-security-headers.headers.stsIncludeSubdomains=true"
- "traefik.http.middlewares.agent-huddle-security-headers.headers.stsPreload=true"
- "traefik.http.middlewares.agent-huddle-security-headers.headers.contentTypeNosniff=true"
- "traefik.http.middlewares.agent-huddle-security-headers.headers.referrerPolicy=strict-origin-when-cross-origin"
volumes:
agent_huddle_postgres_data:
agent_huddle_redis_data:
networks:
app-network:
external: true