-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
48 lines (46 loc) · 1.65 KB
/
Copy pathdocker-compose.yml
File metadata and controls
48 lines (46 loc) · 1.65 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
# opencoder - single-host self-deployment
#
# Pick the port you want to share with friends (defaults to 4000),
# point a secret JWT at it, optionally wire an AI key, and run
# docker compose up --build
#
# Then share http://<your-ip>:${PORT} with your friends.
# Use Tailscale or Cloudflare Tunnel if you want them on a different network.
services:
opencoder:
build:
context: .
dockerfile: Dockerfile
container_name: opencoder
restart: unless-stopped
ports:
- "${PORT:-4000}:4000"
environment:
NODE_ENV: production
PORT: "4000"
HOST: "0.0.0.0"
# Required. Refuses to start if unset / empty. Generate with:
# openssl rand -hex 32
JWT_SECRET: "${JWT_SECRET:?JWT_SECRET must be set in .env - generate with: openssl rand -hex 32}"
PUBLIC_BASE_URL: "${PUBLIC_BASE_URL:-http://localhost:4000}"
DATABASE_URL: "${DATABASE_URL:-file:/data/opencoder.db}"
DATA_DIR: "/data"
AI_PROVIDER: "${AI_PROVIDER:-none}"
ANTHROPIC_API_KEY: "${ANTHROPIC_API_KEY:-}"
ANTHROPIC_MODEL: "${ANTHROPIC_MODEL:-claude-sonnet-4-6}"
OPENAI_API_KEY: "${OPENAI_API_KEY:-}"
OPENAI_MODEL: "${OPENAI_MODEL:-gpt-4o-mini}"
EXEC_FORCE_LOCAL: "${EXEC_FORCE_LOCAL:-false}"
volumes:
- opencoder_data:/data
# Mount the host docker socket so the api can spawn sandboxed
# language containers. Comment this out to force-local exec.
- /var/run/docker.sock:/var/run/docker.sock
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://localhost:4000/health || exit 1"]
interval: 30s
timeout: 3s
retries: 5
start_period: 20s
volumes:
opencoder_data: