mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 12:24:30 +01:00
feat(docker): one-line installer and release Compose file
Add scripts/install.sh, a one-line installer that checks Docker and Compose v2, installs into ~/opencode-manager (override with OCM_DIR), prompts for an optional OpenCode config import, a repos folder mount and LAN sign-in, then pulls and starts the published image. - Add docker-compose.release.yml, which runs the published image under the Compose project name ocm; a checkout's docker-compose.yml keeps building from source - Generate AUTH_SECRET on first container start and persist it to the data volume when unset, so Compose installs need no .env - Refuse to install over a source checkout or beside an existing install, so volumes and the auth secret are not silently replaced - Test the installer, entrypoint secret handling, and the two Compose files staying in step
This commit is contained in:
1 parent
87636bf1ff
commit
27996ed12d
10 files changed
+734
-31
No files matched your search
@@ -0,0 +1,71 @@
|
||||
# Runs the published release image instead of building from source.
|
||||
# The installer saves this file as docker-compose.yml.
|
||||
# Keep it identical to docker-compose.yml apart from name and image/build.
|
||||
|
||||
name: ocm
|
||||
|
||||
services:
|
||||
app:
|
||||
image: ghcr.io/chriswritescode-dev/opencode-manager:latest
|
||||
container_name: opencode-manager
|
||||
ports:
|
||||
- "5003:5003"
|
||||
- "5004:5004"
|
||||
- "5100:5100"
|
||||
- "5101:5101"
|
||||
- "5102:5102"
|
||||
- "5103:5103"
|
||||
environment:
|
||||
- NODE_ENV=${NODE_ENV:-production}
|
||||
- PUID=${PUID:-1000}
|
||||
- PGID=${PGID:-1000}
|
||||
- HOST=0.0.0.0
|
||||
- PORT=5003
|
||||
- OPENCODE_SERVER_PORT=5551
|
||||
- OPENCODE_HOST=127.0.0.1
|
||||
- DATABASE_PATH=/app/data/opencode.db
|
||||
- WORKSPACE_PATH=/workspace
|
||||
- PROCESS_START_WAIT_MS=2000
|
||||
- PROCESS_VERIFY_WAIT_MS=1000
|
||||
- HEALTH_CHECK_TIMEOUT_MS=30000
|
||||
- MAX_FILE_SIZE_MB=50
|
||||
- MAX_UPLOAD_SIZE_MB=50
|
||||
- DEBUG=false
|
||||
- AUTH_SECRET=${AUTH_SECRET:-}
|
||||
- AUTH_TRUSTED_ORIGINS=${AUTH_TRUSTED_ORIGINS:-http://localhost:5003}
|
||||
- ADMIN_EMAIL=${ADMIN_EMAIL:-}
|
||||
- ADMIN_PASSWORD=${ADMIN_PASSWORD:-}
|
||||
- ADMIN_PASSWORD_RESET=${ADMIN_PASSWORD_RESET:-false}
|
||||
- GITHUB_CLIENT_ID=${GITHUB_CLIENT_ID:-}
|
||||
- GITHUB_CLIENT_SECRET=${GITHUB_CLIENT_SECRET:-}
|
||||
- GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID:-}
|
||||
- GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET:-}
|
||||
- DISCORD_CLIENT_ID=${DISCORD_CLIENT_ID:-}
|
||||
- DISCORD_CLIENT_SECRET=${DISCORD_CLIENT_SECRET:-}
|
||||
- AUTH_SECURE_COOKIES=${AUTH_SECURE_COOKIES:-false}
|
||||
- PASSKEY_RP_ID=${PASSKEY_RP_ID:-localhost}
|
||||
- PASSKEY_RP_NAME=${PASSKEY_RP_NAME:-OpenCode Manager}
|
||||
- PASSKEY_ORIGIN=${PASSKEY_ORIGIN:-http://localhost:5003}
|
||||
- PREVIEW_PUBLIC_URL=${PREVIEW_PUBLIC_URL:-}
|
||||
- VAPID_PUBLIC_KEY=${VAPID_PUBLIC_KEY:-}
|
||||
- VAPID_PRIVATE_KEY=${VAPID_PRIVATE_KEY:-}
|
||||
- VAPID_SUBJECT=${VAPID_SUBJECT:-}
|
||||
volumes:
|
||||
- ${OCM_WORKSPACE_HOST_PATH:-opencode-workspace}:/workspace
|
||||
- opencode-data:/app/data
|
||||
- opencode-bin:/home/node/.opencode/bin
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:5003/api/health"]
|
||||
interval: 30s
|
||||
timeout: 3s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
|
||||
volumes:
|
||||
opencode-workspace:
|
||||
driver: local
|
||||
opencode-data:
|
||||
driver: local
|
||||
opencode-bin:
|
||||
driver: local
|
||||
Reference in new issue
Block a user