-
Notifications
You must be signed in to change notification settings - Fork 39
/
docker-compose.full.yml
68 lines (67 loc) · 1.44 KB
/
docker-compose.full.yml
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
version: "3"
services:
postgres:
image: ankane/pgvector:latest
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASS}
POSTGRES_DB: ${DB_NAME}
PGUSER: ${DB_USER}
healthcheck:
test: pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB
interval: 10s
timeout: 5s
retries: 5
ports:
- "${DB_PORT}:5432"
networks:
- codex_network
app:
build:
context: .
dockerfile: Dockerfile
develop:
watch:
- action: rebuild
files:
- ./**/*.py
path: .
environment:
# Override DATABASE_URL from .env with host and port (db:5432) of DB service
DATABASE_URL: "postgresql://${DB_USER}:${DB_PASS}@postgres:${DB_PORT}/${DB_NAME}"
OPENAI_API_KEY: ${OPENAI_API_KEY}
RUN_ENV: ${RUN_ENV}
ports:
- "${PORT:-8080}:8000"
depends_on:
postgres:
condition: service_healthy
networks:
- codex_network
healthcheck:
test:
[
"CMD",
"curl",
"-f",
"http://localhost:8080/docs"
]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
frontend:
build:
context: .
dockerfile: Dockerfile.frontend
ports:
- "8501:8501"
networks:
- codex_network
depends_on:
- app
environment:
BACKEND_URL: "http://app:8080"
networks:
codex_network:
driver: bridge