mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 04:44:21 +01:00
Readme redesign (#146)
* Redesign README for improved GitHub rendering * Fix release badge URL format * Add .env setup to Quick Start and update config examples * Add Git Commit Demo GIF * Fix release badge to use tag endpoint * update development docs and fix default port in env * Enhance Docker documentation with environment variables and entrypoint behavior * Expand Memory plugin documentation with architecture, agents, and hooks * Add dark mode CSS and configure MkDocs for dark-only theme
This commit is contained in:
1 parent
a911a2f759
commit
be871aa5b2
8 files changed
+759
-589
No files matched your search
@@ -7,9 +7,24 @@ Advanced Docker setup and configuration options.
|
||||
```bash
|
||||
git clone https://github.com/chriswritescode-dev/opencode-manager.git
|
||||
cd opencode-manager
|
||||
|
||||
# Copy and configure environment
|
||||
cp .env.example .env
|
||||
|
||||
# Generate a secure AUTH_SECRET
|
||||
openssl rand -base64 32
|
||||
# Add the output to AUTH_SECRET in .env
|
||||
|
||||
# Start the container
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
!!! warning "AUTH_SECRET Required"
|
||||
The container will not start without `AUTH_SECRET` set in your `.env` file. Generate one with:
|
||||
```bash
|
||||
openssl rand -base64 32
|
||||
```
|
||||
|
||||
## docker-compose.yml
|
||||
|
||||
Default configuration:
|
||||
@@ -27,11 +42,31 @@ services:
|
||||
- "5101:5101" # Dev server 2
|
||||
- "5102:5102" # Dev server 3
|
||||
- "5103:5103" # Dev server 4
|
||||
environment:
|
||||
- NODE_ENV=${NODE_ENV:-production}
|
||||
- HOST=0.0.0.0
|
||||
- PORT=5003
|
||||
- OPENCODE_SERVER_PORT=5551
|
||||
- DATABASE_PATH=/app/data/opencode.db
|
||||
- WORKSPACE_PATH=/workspace
|
||||
- AUTH_SECRET=${AUTH_SECRET}
|
||||
- AUTH_TRUSTED_ORIGINS=${AUTH_TRUSTED_ORIGINS:-http://localhost:5003}
|
||||
- ADMIN_EMAIL=${ADMIN_EMAIL:-}
|
||||
- ADMIN_PASSWORD=${ADMIN_PASSWORD:-}
|
||||
# OAuth providers (optional)
|
||||
- GITHUB_CLIENT_ID=${GITHUB_CLIENT_ID:-}
|
||||
- GITHUB_CLIENT_SECRET=${GITHUB_CLIENT_SECRET:-}
|
||||
# Passkeys (optional)
|
||||
- PASSKEY_RP_ID=${PASSKEY_RP_ID:-localhost}
|
||||
- PASSKEY_RP_NAME=${PASSKEY_RP_NAME:-OpenCode Manager}
|
||||
- PASSKEY_ORIGIN=${PASSKEY_ORIGIN:-http://localhost:5003}
|
||||
# Push notifications (optional)
|
||||
- VAPID_PUBLIC_KEY=${VAPID_PUBLIC_KEY:-}
|
||||
- VAPID_PRIVATE_KEY=${VAPID_PRIVATE_KEY:-}
|
||||
- VAPID_SUBJECT=${VAPID_SUBJECT:-}
|
||||
volumes:
|
||||
- opencode-workspace:/workspace
|
||||
- opencode-data:/app/data
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:5003/api/health"]
|
||||
@@ -47,6 +82,42 @@ volumes:
|
||||
driver: local
|
||||
```
|
||||
|
||||
## Environment Variables
|
||||
|
||||
Create a `.env` file in the project root. The docker-compose.yml automatically reads variables from `.env`:
|
||||
|
||||
```bash
|
||||
# Required
|
||||
AUTH_SECRET=generate-with-openssl-rand-base64-32
|
||||
|
||||
# Optional - pre-configured admin
|
||||
ADMIN_EMAIL=admin@example.com
|
||||
ADMIN_PASSWORD=your-secure-password
|
||||
|
||||
# Optional - OAuth providers
|
||||
GITHUB_CLIENT_ID=your-client-id
|
||||
GITHUB_CLIENT_SECRET=your-client-secret
|
||||
|
||||
# Optional - passkeys
|
||||
PASSKEY_RP_ID=localhost
|
||||
PASSKEY_ORIGIN=http://localhost:5003
|
||||
|
||||
# Optional - push notifications
|
||||
VAPID_PUBLIC_KEY=BMx-1234567890abcdefghijklmnopqrstuv...
|
||||
VAPID_PRIVATE_KEY=abcd1234567890abcdef...
|
||||
VAPID_SUBJECT=mailto:you@example.com
|
||||
```
|
||||
|
||||
## Entrypoint Behavior
|
||||
|
||||
The container entrypoint (`scripts/docker-entrypoint.sh`) automatically:
|
||||
|
||||
1. **Installs Bun** if not present
|
||||
2. **Installs OpenCode** if not present
|
||||
3. **Upgrades OpenCode** if below minimum version (1.0.137)
|
||||
4. **Validates AUTH_SECRET** is set (required for startup)
|
||||
5. **Validates memory plugin** installation
|
||||
|
||||
## Port Configuration
|
||||
|
||||
### Main Application
|
||||
@@ -132,36 +203,6 @@ Contains:
|
||||
|
||||
Uses a named volume for data persistence.
|
||||
|
||||
## Environment Variables
|
||||
|
||||
### Using .env File
|
||||
|
||||
Create `.env` in project root:
|
||||
|
||||
```bash
|
||||
AUTH_SECRET=your-secret-here
|
||||
ADMIN_EMAIL=admin@example.com
|
||||
ADMIN_PASSWORD=secure-password
|
||||
```
|
||||
|
||||
Reference in docker-compose.yml:
|
||||
|
||||
```yaml
|
||||
env_file:
|
||||
- .env
|
||||
```
|
||||
|
||||
### Inline Environment
|
||||
|
||||
Set directly in docker-compose.yml:
|
||||
|
||||
```yaml
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- AUTH_SECRET=your-secret-here
|
||||
- ADMIN_EMAIL=admin@example.com
|
||||
```
|
||||
|
||||
## Health Checks
|
||||
|
||||
The container includes health checks:
|
||||
@@ -256,11 +297,11 @@ docker-compose build
|
||||
# Rebuild without cache
|
||||
docker-compose build --no-cache
|
||||
|
||||
# Pull latest base images
|
||||
docker-compose pull
|
||||
|
||||
# Update and restart
|
||||
docker-compose pull && docker-compose up -d --build
|
||||
# Update and restart (uses upgrade script)
|
||||
docker-compose down
|
||||
git pull
|
||||
docker-compose build --no-cache
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
### Debugging
|
||||
@@ -302,41 +343,3 @@ docker exec -it opencode-manager vi /workspace/.config/opencode/AGENTS.md
|
||||
### Precedence
|
||||
|
||||
Global instructions merge with repository-specific `AGENTS.md` files. Repository instructions take precedence.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Container Won't Start
|
||||
|
||||
```bash
|
||||
# Check logs
|
||||
docker-compose logs
|
||||
|
||||
# Check if port is in use
|
||||
lsof -i :5003
|
||||
|
||||
# Try running in foreground
|
||||
docker-compose up
|
||||
```
|
||||
|
||||
### Permission Issues
|
||||
|
||||
```bash
|
||||
# Fix workspace permissions
|
||||
sudo chown -R $(id -u):$(id -g) ./workspace ./data
|
||||
|
||||
# Or run with specific user
|
||||
docker-compose run --user $(id -u):$(id -g) opencode-manager
|
||||
```
|
||||
|
||||
### Out of Disk Space
|
||||
|
||||
```bash
|
||||
# Check Docker disk usage
|
||||
docker system df
|
||||
|
||||
# Clean up unused resources
|
||||
docker system prune -a
|
||||
|
||||
# Remove unused volumes
|
||||
docker volume prune
|
||||
```
|
||||
Reference in new issue
Block a user