-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
97 lines (92 loc) · 2.55 KB
/
docker-compose.yml
File metadata and controls
97 lines (92 loc) · 2.55 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
services:
# PostgreSQL Database
postgres:
image: postgres:16-alpine
container_name: nextsight-postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: nextsight
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
# Redis Cache
redis:
image: redis:7-alpine
container_name: nextsight-redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
command: redis-server --appendonly yes
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: nextsight-backend
ports:
- "8000:8000"
environment:
# Database & Auth (Production mode)
- DATABASE_URL=postgresql+asyncpg://postgres:postgres@postgres:5432/nextsight
- USE_DATABASE_AUTH=true
- REDIS_URL=redis://redis:6379/0
- REDIS_ENABLED=true
# Security - CHANGE IN PRODUCTION
- SECRET_KEY=${SECRET_KEY:-change-this-secret-key-in-production}
# Kubernetes
- K8S_IN_CLUSTER=false
- K8S_CONFIG_PATH=/home/nextsight/.kube/config
- K8S_HOST_OVERRIDE=host.docker.internal
# AI Provider (optional - set via .env file)
- AI_PROVIDER=${AI_PROVIDER:-gemini}
- GEMINI_API_KEY=${GEMINI_API_KEY:-}
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-}
# OAuth (optional - set via .env file)
- OAUTH_ENABLED=${OAUTH_ENABLED:-false}
- GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID:-}
- GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET:-}
- GITHUB_CLIENT_ID=${GITHUB_CLIENT_ID:-}
- GITHUB_CLIENT_SECRET=${GITHUB_CLIENT_SECRET:-}
volumes:
- ~/.kube:/home/nextsight/.kube:ro # Mount kubeconfig for local development
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: nextsight-frontend
ports:
- "3000:80"
depends_on:
- backend
restart: unless-stopped
volumes:
postgres_data:
redis_data:
networks:
default:
name: nextsight-network