-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
41 lines (38 loc) · 1.18 KB
/
docker-compose.yml
File metadata and controls
41 lines (38 loc) · 1.18 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
version: '3.8'
services:
postgres:
image: postgres:15-alpine
container_name: crm-postgres
environment:
POSTGRES_DB: ${POSTGRES_DB:-crm_database}
POSTGRES_USER: ${POSTGRES_USER:-crm_user}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-crm_password}
volumes:
- postgres_data:/var/lib/postgresql/data
- ./database/create_clean_schema.sql:/docker-entrypoint-initdb.d/01-init.sql
ports:
- "5433:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-crm_user} -d ${POSTGRES_DB:-crm_database}"]
interval: 10s
timeout: 5s
retries: 5
crm-agent:
build: .
container_name: crm-agent-app
environment:
- OPENAI_API_KEY=${OPENAI_API_KEY}
- DATABASE_URL=postgresql://${POSTGRES_USER:-crm_user}:${POSTGRES_PASSWORD:-crm_password}@postgres:5432/${POSTGRES_DB:-crm_database}
- LOG_LEVEL=${LOG_LEVEL:-INFO}
volumes:
- ./src:/app/src
- ./cli:/app/cli
- ./database:/app/database
depends_on:
postgres:
condition: service_healthy
stdin_open: true
tty: true
restart: unless-stopped
volumes:
postgres_data: