-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
88 lines (82 loc) · 1.97 KB
/
docker-compose.yml
File metadata and controls
88 lines (82 loc) · 1.97 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
# ReasonFlow Docker Compose Configuration
# This file defines the multi-service setup for local development
version: "3.8"
services:
# PostgreSQL database with pgvector extension
db:
image: pgvector/pgvector:pg16
container_name: reasonflow-db
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: reasonflow
volumes:
- pgdata:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d reasonflow"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
networks:
- reasonflow-network
# FastAPI backend
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: reasonflow-backend
ports:
- "8000:8000"
environment:
# Database connection using Docker service name
DATABASE_URL: postgresql+asyncpg://postgres:postgres@db:5432/reasonflow
# Load additional env vars from .env file
- GEMINI_API_KEY
- GMAIL_CLIENT_ID
- GMAIL_CLIENT_SECRET
- GMAIL_REDIRECT_URI
- JWT_SECRET_KEY
- JWT_ALGORITHM
- JWT_EXPIRATION_MINUTES
- CORS_ORIGINS
- APP_ENV
- APP_DEBUG
env_file:
- ./backend/.env
depends_on:
db:
condition: service_healthy
volumes:
- ./backend/app:/app/app:ro
networks:
- reasonflow-network
restart: unless-stopped
# Next.js frontend
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: reasonflow-frontend
ports:
- "3000:3000"
environment:
- NEXT_PUBLIC_API_URL=http://localhost:8000
volumes:
- ./frontend:/app
- /app/node_modules
- /app/.next
command: npm run dev
depends_on:
- backend
networks:
- reasonflow-network
volumes:
pgdata:
name: reasonflow-pgdata
networks:
reasonflow-network:
name: reasonflow-network
driver: bridge