Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
89 lines (83 loc) · 2.47 KB
/
Copy pathdocker-compose.yml
File metadata and controls
89 lines (83 loc) · 2.47 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
# =============================================================================
# CodeForge AI - Docker Compose for Local Testing
# =============================================================================
# Run: docker-compose up --build
# =============================================================================
version: '3.8'
services:
# Full application with Next.js frontend
codeforge-full:
build:
context: .
dockerfile: Dockerfile
container_name: codeforge-ai-full
ports:
- "7860:7860"
environment:
- DATABASE_URL=sqlite:///app/data/codeforge.db
- SECRET_KEY=${SECRET_KEY:-your-secret-key-change-in-production}
- VENICE_API_KEY=${VENICE_API_KEY:-}
- GITHUB_PERSONAL_ACCESS_TOKEN=${GITHUB_PERSONAL_ACCESS_TOKEN:-}
- GITHUB_USERNAME=${GITHUB_USERNAME:-}
- HOST=0.0.0.0
- PORT=7860
- DEBUG=false
- USE_SQLITE=true
volumes:
- codeforge-data:/app/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:7860/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
restart: unless-stopped
# Lightweight Gradio-only version
codeforge-gradio:
build:
context: .
dockerfile: Dockerfile.gradio
container_name: codeforge-ai-gradio
ports:
- "7861:7860"
environment:
- DATABASE_URL=sqlite:///app/data/codeforge.db
- SECRET_KEY=${SECRET_KEY:-your-secret-key-change-in-production}
- VENICE_API_KEY=${VENICE_API_KEY:-}
- GITHUB_PERSONAL_ACCESS_TOKEN=${GITHUB_PERSONAL_ACCESS_TOKEN:-}
- HOST=0.0.0.0
- PORT=7860
- USE_SQLITE=true
volumes:
- codeforge-gradio-data:/app/data
restart: unless-stopped
profiles:
- gradio
# PostgreSQL database (optional, for local development with full DB)
postgres:
image: postgres:15-alpine
container_name: codeforge-postgres
environment:
- POSTGRES_USER=codeforge
- POSTGRES_PASSWORD=codeforge_password
- POSTGRES_DB=codeforge_db
volumes:
- postgres-data:/var/lib/postgresql/data
- ./database/init.sql:/docker-entrypoint-initdb.d/init.sql
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U codeforge -d codeforge_db"]
interval: 10s
timeout: 5s
retries: 5
profiles:
- postgres
restart: unless-stopped
volumes:
codeforge-data:
codeforge-gradio-data:
postgres-data:
networks:
default:
name: codeforge-network