Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
66 lines (63 loc) · 1.82 KB
/
Copy pathdocker-compose.yml
File metadata and controls
66 lines (63 loc) · 1.82 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
services:
db:
image: ankane/pgvector:v0.5.1
environment:
POSTGRES_USER: ${DB_USERNAME:-pf_rag_user}
POSTGRES_PASSWORD: ${DB_PASSWORD:-pf_rag_password}
POSTGRES_DB: ${DB_NAME:-pf_rag_db}
networks:
- internal
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USERNAME:-pf_rag_user} -d ${DB_NAME:-pf_rag_db}"]
interval: 10s
timeout: 5s
retries: 5
api:
build: ./api
environment:
MIX_ENV: ${MIX_ENV:-prod}
DB_USERNAME: ${DB_USERNAME:-pf_rag_user}
DB_PASSWORD: ${DB_PASSWORD:-pf_rag_password}
DB_HOST: ${DB_HOST:-db}
DB_PORT: ${DB_PORT:-5432}
DB_NAME: ${DB_NAME:-pf_rag_db}
DATABASE_URL: ecto://${DB_USERNAME:-pf_rag_user}:${DB_PASSWORD:-pf_rag_password}@${DB_HOST:-db}/${DB_NAME:-pf_rag_db}
DB_POOL_SIZE: ${DB_POOL_SIZE:-10}
PORT: ${PORT:-4000}
PHX_HOST: ${PHX_HOST:-localhost}
SECRET_KEY_BASE: ${SECRET_KEY_BASE:?SECRET_KEY_BASE is required}
ENCRYPTION_KEY: ${ENCRYPTION_KEY:-dev_encryption_key_32_chars_long}
JOKEN_SIGNER: ${JOKEN_SIGNER:-super_secret_key_for_dev_only_change_in_prod}
OPENROUTER_API_KEY: ${OPENROUTER_API_KEY}
PGPASSWORD: ${DB_PASSWORD:-pf_rag_password}
volumes:
- ./db/import:/import:ro
networks:
- internal
- frontend
depends_on:
db:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:4000/api/health || exit 1"]
interval: 10s
timeout: 5s
retries: 5
ui:
build: ./ui
ports:
- "80:80"
networks:
- frontend
depends_on:
- api
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost/health || exit 1"]
interval: 10s
timeout: 5s
retries: 5
networks:
internal:
internal: true
frontend:
driver: bridge