-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
124 lines (114 loc) · 3.66 KB
/
docker-compose.yml
File metadata and controls
124 lines (114 loc) · 3.66 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
services:
postgres:
image: postgres:16-alpine
container_name: wikitree-intelligence-db
restart: unless-stopped
environment:
POSTGRES_DB: wikitree_intelligence
POSTGRES_USER: wikitree
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme_in_production}
PGDATA: /var/lib/postgresql/data/pgdata
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "${POSTGRES_PORT:-5432}:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -h localhost -U wikitree -d wikitree_intelligence"]
interval: 10s
timeout: 5s
retries: 5
networks:
- wikitree-network
api:
build:
context: ./apps/api
dockerfile: Dockerfile
container_name: wikitree-intelligence-api
restart: unless-stopped
environment:
# Server configuration
PORT: ${BACKEND_PORT:-8080}
LOG_LEVEL: ${LOG_LEVEL:-INFO}
ENVIRONMENT: ${ENVIRONMENT:-development}
# CORS configuration
CLIENT_ORIGINS: ${CLIENT_ORIGINS:-["http://localhost:3000","http://localhost:5173"]}
# Authentication
AUTH_DISABLED: ${AUTH_DISABLED:-false}
GOOGLE_OAUTH_CLIENT_ID: ${GOOGLE_OAUTH_CLIENT_ID:?GOOGLE_OAUTH_CLIENT_ID must be set}
ALLOWED_HOSTED_DOMAINS: ${ALLOWED_HOSTED_DOMAINS:-[]}
SESSION_SECRET_KEY: ${SESSION_SECRET_KEY:?SESSION_SECRET_KEY must be set}
# Database configuration
DATABASE_URL: postgresql+asyncpg://wikitree:${POSTGRES_PASSWORD:-changeme_in_production}@postgres:5432/wikitree_intelligence
ports:
- "${BACKEND_PORT:-8080}:${BACKEND_PORT:-8080}"
depends_on:
postgres:
condition: service_healthy
volumes:
- gedcom_data:/app/gedcom_data
networks:
- wikitree-network
healthcheck:
test: ["CMD-SHELL", "python3 -c \"import urllib.request; urllib.request.urlopen('http://localhost:${BACKEND_PORT:-8080}/health')\" || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
worker:
build:
context: ./apps/worker
dockerfile: Dockerfile
container_name: wikitree-intelligence-worker
restart: unless-stopped
environment:
# Server configuration
PORT: ${WORKER_PORT:-8081}
LOG_LEVEL: ${LOG_LEVEL:-INFO}
ENVIRONMENT: ${ENVIRONMENT:-development}
# Database configuration
DATABASE_URL: postgresql+asyncpg://wikitree:${POSTGRES_PASSWORD:-changeme_in_production}@postgres:5432/wikitree_intelligence
ports:
- "${WORKER_PORT:-8081}:${WORKER_PORT:-8081}"
depends_on:
postgres:
condition: service_healthy
volumes:
- gedcom_data:/app/gedcom_data
networks:
- wikitree-network
healthcheck:
test: ["CMD-SHELL", "python3 -c \"import urllib.request; urllib.request.urlopen('http://localhost:${WORKER_PORT:-8081}/health/ready')\" || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
ui:
build:
context: ./apps/ui
dockerfile: Dockerfile
args:
VITE_API_BASE_URL: ${VITE_API_BASE_URL:-http://localhost:8080}
VITE_GOOGLE_CLIENT_ID: ${VITE_GOOGLE_CLIENT_ID:?VITE_GOOGLE_CLIENT_ID must be set}
container_name: wikitree-intelligence-ui
restart: unless-stopped
ports:
- "${FRONTEND_PORT:-3000}:3000"
depends_on:
api:
condition: service_healthy
networks:
- wikitree-network
healthcheck:
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:3000 || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
volumes:
postgres_data:
driver: local
gedcom_data:
driver: local
networks:
wikitree-network:
driver: bridge