-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
99 lines (95 loc) · 2.87 KB
/
Copy pathdocker-compose.yml
File metadata and controls
99 lines (95 loc) · 2.87 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
services:
# ==========================================
# PostgreSQL Service
# ==========================================
postgres:
image: pgvector/pgvector:pg15
restart: unless-stopped
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: inboxos
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./scripts/postgres/init.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres -d inboxos" ]
interval: 5s
timeout: 5s
retries: 5
# ==========================================
# Redis Cache & Broker Service
# ==========================================
redis:
image: redis:7-alpine
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- redis_data:/data
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 5s
timeout: 5s
retries: 5
# ==========================================
# Node.js Backend Service
# ==========================================
backend:
build:
context: ./backend
dockerfile: Dockerfile
target: dev
restart: unless-stopped
ports:
- "8000:8000"
environment:
- PORT=8000
- NODE_ENV=development
- ENVIRONMENT=local
- DATABASE_URL=postgresql://postgres:postgres@postgres:5432/inboxos?schema=public
- REDIS_URL=redis://redis:6379/0
- JWT_SECRET=replace_with_random_64_char_hex_string_for_dev_mode_only
- ENCRYPTION_KEY=replace_with_exactly_32_characters!!
# Optional external APIs (can be supplied from host environment if needed)
- GMAIL_CLIENT_ID=${GMAIL_CLIENT_ID:-}
- GMAIL_CLIENT_SECRET=${GMAIL_CLIENT_SECRET:-}
- GMAIL_REDIRECT_URI=${GMAIL_REDIRECT_URI:-http://localhost:8000/api/integrations/gmail/callback}
- OPENAI_API_KEY=${OPENAI_API_KEY:-}
- GEMINI_API_KEY=${GEMINI_API_KEY:-}
- AI_PROVIDER=${AI_PROVIDER:-openai}
volumes:
- ./backend:/usr/src/app
# Anonymous volume to preserve node_modules installed inside the container
- /usr/src/app/node_modules
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
# Start backend server using dev mode for hot reloading
command: npm run dev
# ==========================================
# React Frontend Service
# ==========================================
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
target: dev
restart: unless-stopped
ports:
- "80:5173"
environment:
- VITE_API_BASE_URL=http://localhost:8000
volumes:
- ./frontend:/app
# Anonymous volume to preserve node_modules installed inside the container
- /app/node_modules
depends_on:
- backend
volumes:
postgres_data:
redis_data: