-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
76 lines (71 loc) · 1.73 KB
/
docker-compose.yml
File metadata and controls
76 lines (71 loc) · 1.73 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
67
68
69
70
71
72
73
74
75
76
version: '3.9'
services:
postgres:
image: postgres:16-alpine
container_name: govos_postgres
environment:
POSTGRES_DB: governance_os
POSTGRES_USER: govos
POSTGRES_PASSWORD: local_dev_password
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U govos -d governance_os"]
interval: 5s
timeout: 5s
retries: 5
networks:
- govos_network
backend:
build:
context: .
dockerfile: core/Dockerfile
container_name: govos_backend
environment:
DATABASE_URL: postgresql://govos:local_dev_password@postgres:5432/governance_os
CORS_ORIGINS: '["http://localhost:3000"]'
LOG_LEVEL: INFO
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY}
GOOGLE_API_KEY: ${GOOGLE_API_KEY}
ports:
- "8000:8000"
depends_on:
postgres:
condition: service_healthy
volumes:
- ./core:/app/core
- ./packs:/app/packs
- ./db:/app/db
- ./coprocessor:/app/coprocessor
networks:
- govos_network
command: >
sh -c "
echo 'Waiting for database...' &&
sleep 2 &&
echo 'Running migrations...' &&
alembic upgrade head &&
echo 'Starting API server...' &&
uvicorn core.main:app --host 0.0.0.0 --port 8000 --reload
"
# Frontend (Next.js)
frontend:
build:
context: ./ui
dockerfile: Dockerfile
container_name: govos_frontend
environment:
NEXT_PUBLIC_API_URL: http://localhost:8000/api/v1
ports:
- "3000:3000"
depends_on:
- backend
networks:
- govos_network
volumes:
postgres_data:
networks:
govos_network:
driver: bridge