-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
120 lines (114 loc) · 3.4 KB
/
docker-compose.yml
File metadata and controls
120 lines (114 loc) · 3.4 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
version: '3.8'
services:
# PostgreSQL Database
postgres:
image: postgres:16-alpine
container_name: engineerr-postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: engineerr
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./backend/migrations:/docker-entrypoint-initdb.d:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d engineerr"]
interval: 5s
timeout: 5s
retries: 5
# E2B Sandbox Orchestration Service
sandbox-service:
build:
context: ./sandbox-service
dockerfile: Dockerfile
container_name: engineerr-sandbox
ports:
- "3001:3001"
environment:
E2B_API_KEY: ${E2B_API_KEY}
PORT: 3001
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3001/health"]
interval: 10s
timeout: 5s
retries: 3
restart: unless-stopped
# Go Backend
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: engineerr-backend
ports:
- "3000:3000"
environment:
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/engineerr?sslmode=disable
GITHUB_OAUTH_CLIENT_ID: ${GITHUB_OAUTH_CLIENT_ID}
GITHUB_OAUTH_CLIENT_SECRET: ${GITHUB_OAUTH_CLIENT_SECRET}
OAUTH_REDIRECT_URL: http://localhost:3000/api/auth/callback
JWT_SECRET: ${JWT_SECRET:-your-super-secret-jwt-key-change-in-production}
JWT_EXPIRY_HOURS: 720
FRONTEND_URL: http://localhost:5173
# OpenCode integration
OPENCODE_URL: http://opencode:4096
OPENCODE_PASSWORD: ${OPENCODE_PASSWORD:-dev}
# Sandbox service integration
SANDBOX_SERVICE_URL: http://sandbox-service:3001
depends_on:
postgres:
condition: service_healthy
opencode:
condition: service_healthy
sandbox-service:
condition: service_healthy
restart: unless-stopped
# OpenCode AI Agent Server
# Uses community Docker image that runs OpenCode in headless serve mode
# Source: https://github.com/thesammykins/opencode-unraid
opencode:
image: ghcr.io/thesammykins/opencode-unraid:latest
container_name: engineerr-opencode
ports:
- "4096:4096"
environment:
# OpenCode server authentication
OPENCODE_PASSWORD: ${OPENCODE_PASSWORD:-dev}
# AI Provider API keys (at least one required)
OPENAI_API_KEY: ${OPENAI_API_KEY}
# Default model
OPENCODE_MODEL: gpt-5.2
# Server port
OPENCODE_PORT: 4096
volumes:
# Mount workspace for repository access
- opencode_workspace:/workspace
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:4096/health"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
# React Frontend (dev mode)
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: engineerr-frontend
ports:
- "5173:5173"
environment:
# Use backend service name for container-to-container communication
- VITE_API_URL=http://backend:3000
volumes:
- ./frontend/src:/app/src:ro
- ./frontend/index.html:/app/index.html:ro
- ./frontend/vite.config.ts:/app/vite.config.ts:ro
depends_on:
- backend
restart: unless-stopped
volumes:
postgres_data:
opencode_workspace: