-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
57 lines (54 loc) · 1.48 KB
/
Copy pathdocker-compose.yml
File metadata and controls
57 lines (54 loc) · 1.48 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
services:
db:
image: postgres:16-alpine
container_name: information-edge-db
environment:
POSTGRES_DB: information_edge
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d information_edge"]
interval: 10s
timeout: 5s
retries: 10
restart: unless-stopped
backend:
build:
context: .
dockerfile: Dockerfile
container_name: information-edge-backend
depends_on:
db:
condition: service_healthy
environment:
DATABASE_URL: postgresql+psycopg://postgres:postgres@db:5432/information_edge
API_CORS_ORIGINS: http://localhost:5173,http://127.0.0.1:5173,http://localhost:3000
PIPELINE_LOG_TO_FILE: "false"
ports:
- "8000:8000"
command: ["sh", "-c", "alembic upgrade head && uvicorn src.api:app --host 0.0.0.0 --port 8000"]
healthcheck:
test: ["CMD-SHELL", "curl -fsS http://127.0.0.1:8000/health || exit 1"]
interval: 15s
timeout: 5s
retries: 10
restart: unless-stopped
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
VITE_API_BASE_URL: http://localhost:8000
container_name: information-edge-frontend
depends_on:
backend:
condition: service_healthy
ports:
- "5173:80"
restart: unless-stopped
volumes:
postgres_data: