-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
118 lines (112 loc) · 4.66 KB
/
Copy pathdocker-compose.yml
File metadata and controls
118 lines (112 loc) · 4.66 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
name: skillnote
# ─── Which compose file is this? ─────────────────────────────────
# This file BUILDS from local source — for contributors hacking on
# SkillNote itself (the install.sh script uses this one).
#
# End users wanting to run SkillNote should prefer:
# - `npx skillnote start` (recommended), or
# - the pinned-image compose file at deploy/docker-compose.yml.
# ─────────────────────────────────────────────────────────────────
#
# ─── Configuration ───────────────────────────────────────────────
# Set SKILLNOTE_HOST to your machine's IP or domain.
# All services use this single value for URLs and CORS.
#
# SKILLNOTE_HOST=<your-server-ip> docker compose up --build -d
#
# Defaults to localhost (works when browser is on the same machine).
#
# SKILLNOTE_DB_PASSWORD overrides the development Postgres password.
# Default is "skillnote" (preserved for backwards-compat with existing
# installs; the volume is initialised with whatever was set on first run).
# For any deployment beyond a single dev machine, set this to a strong
# random value AND wipe pgdata first (or rotate the password via psql).
# ─────────────────────────────────────────────────────────────────
services:
postgres:
image: postgres:16
environment:
POSTGRES_DB: skillnote
POSTGRES_USER: skillnote
POSTGRES_PASSWORD: ${SKILLNOTE_DB_PASSWORD:-skillnote}
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U skillnote"]
interval: 5s
timeout: 5s
retries: 10
restart: unless-stopped
api:
build:
context: .
dockerfile: backend/Dockerfile
environment:
SKILLNOTE_DATABASE_URL: postgresql+psycopg://skillnote:${SKILLNOTE_DB_PASSWORD:-skillnote}@postgres:5432/skillnote
SKILLNOTE_BUNDLE_STORAGE_DIR: /app/data/bundles
SKILLNOTE_CORS_ORIGINS: "http://${SKILLNOTE_HOST:-localhost}:3000,http://${SKILLNOTE_HOST:-localhost}:3001,http://localhost:3000,http://localhost:3001,http://127.0.0.1:3000,http://127.0.0.1:3001"
# claude.ai connector: auto-approve browser pairings (skips the manual
# 6-char-code approval step). OFF by default — only for trusted
# single-user testing. Bring the stack up with
# SKILLNOTE_CLAUDE_AI_AUTO_APPROVE=1 to enable.
SKILLNOTE_CLAUDE_AI_AUTO_APPROVE: ${SKILLNOTE_CLAUDE_AI_AUTO_APPROVE:-0}
ports:
- "${SKILLNOTE_API_PORT:-8082}:8080"
volumes:
- bundles:/app/data/bundles
- ./plugin:/plugin:ro
- ./plugin-openclaw:/openclaw:ro
- ./plugin-codex:/codex:ro
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "python -c \"import urllib.request; urllib.request.urlopen('http://localhost:8080/health')\""]
interval: 10s
timeout: 5s
retries: 12
start_period: 60s
command: >
sh -c "python scripts/wait_for_db.py &&
alembic upgrade head &&
python scripts/seed_data.py &&
uvicorn app.main:app --host 0.0.0.0 --port 8080"
restart: unless-stopped
mcp:
build:
context: ./backend
dockerfile: Dockerfile.mcp
environment:
SKILLNOTE_DATABASE_URL: postgresql+psycopg://skillnote:${SKILLNOTE_DB_PASSWORD:-skillnote}@postgres:5432/skillnote
ports:
- "${SKILLNOTE_MCP_PORT:-8083}:8083"
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "python -c \"import urllib.request; urllib.request.urlopen('http://localhost:8083/status')\""]
interval: 10s
timeout: 5s
retries: 6
start_period: 30s
restart: unless-stopped
web:
build:
context: .
args:
NEXT_PUBLIC_API_BASE_URL: "http://${SKILLNOTE_HOST:-localhost}:${SKILLNOTE_API_PORT:-8082}"
# The web origin proxies /v1/* to the backend (next.config.ts) so the
# connector extension can pair with the WEB URL, not the API port.
# Inside Docker that's the internal api service on its container port.
SKILLNOTE_API_PROXY_TARGET: "http://api:8080"
ports:
- "${SKILLNOTE_WEB_PORT:-3000}:3000"
environment:
NODE_ENV: production
depends_on:
api:
condition: service_healthy
restart: unless-stopped
volumes:
pgdata:
bundles: