Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
57 lines (54 loc) · 1.53 KB
/
Copy pathdocker-compose.yml
File metadata and controls
57 lines (54 loc) · 1.53 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
# One-command local stack: docker compose up --build
# Web app: http://localhost:3000 API docs: http://localhost:8000/docs
services:
db:
image: pgvector/pgvector:pg16
environment:
POSTGRES_DB: argo
POSTGRES_USER: floatchat
POSTGRES_PASSWORD: floatchat
ports:
- "5433:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U floatchat -d argo"]
interval: 3s
timeout: 3s
retries: 20
backend:
build:
context: .
dockerfile: Dockerfile.api
command: >
sh -c "python -m pipeline snapshot --if-empty &&
python -m pipeline create-reader &&
uvicorn api.main:app --host 0.0.0.0 --port 8000"
env_file:
- path: .env
required: false
environment:
ADMIN_DATABASE_URL: postgresql+psycopg://floatchat:floatchat@db:5432/argo
DATABASE_URL: postgresql+psycopg://floatchat_reader:local-reader-password@db:5432/argo
READER_PASSWORD: local-reader-password
ALLOWED_ORIGINS: http://localhost:3000
ports:
- "8000:8000"
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
db:
condition: service_healthy
web:
build:
context: ./web
args:
NEXT_PUBLIC_API_URL: http://localhost:8000 # what your browser uses
environment:
API_URL_INTERNAL: http://backend:8000 # what the web server uses inside Docker
ports:
- "3000:3000"
depends_on:
- backend
volumes:
pgdata: