mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 12:54:20 +01:00
docs: comprehensive documentation updates for v2 infrastructure changes
This commit is contained in:
1 parent
67ace0ae89
commit
a513712745
18 files changed
+226
-159
No files matched your search
@@ -78,11 +78,7 @@ AUTH_SECRET=your-generated-secret
|
||||
|
||||
### Session Duration
|
||||
|
||||
Sessions last until:
|
||||
|
||||
- User logs out
|
||||
- Browser is closed (unless "Remember me")
|
||||
- Session expires (configurable)
|
||||
Sessions expire after 7 days. A new session is created on each login.
|
||||
|
||||
### Secure Cookies
|
||||
|
||||
@@ -149,7 +145,7 @@ PASSKEY_ORIGIN=http://192.168.1.244:5003
|
||||
### Adding a Passkey
|
||||
|
||||
1. Log in with password
|
||||
2. Go to **Settings > Security**
|
||||
2. Go to **Settings > Account**
|
||||
3. Click **Add Passkey**
|
||||
4. Follow browser/device prompts
|
||||
5. Name your passkey
|
||||
|
||||
@@ -15,11 +15,11 @@ docker-compose up -d
|
||||
Default configuration:
|
||||
|
||||
```yaml
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
opencode-manager:
|
||||
build: .
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: opencode-manager
|
||||
ports:
|
||||
- "5003:5003" # OpenCode Manager
|
||||
@@ -28,20 +28,23 @@ services:
|
||||
- "5102:5102" # Dev server 3
|
||||
- "5103:5103" # Dev server 4
|
||||
volumes:
|
||||
- ./workspace:/workspace
|
||||
- ./data:/app/data
|
||||
- opencode-cache:/root/.opencode
|
||||
- opencode-workspace:/workspace
|
||||
- opencode-data:/app/data
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:5003/health"]
|
||||
test: ["CMD", "curl", "-f", "http://localhost:5003/api/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
timeout: 3s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
|
||||
volumes:
|
||||
opencode-cache:
|
||||
opencode-workspace:
|
||||
driver: local
|
||||
opencode-data:
|
||||
driver: local
|
||||
```
|
||||
|
||||
## Port Configuration
|
||||
@@ -108,10 +111,10 @@ Repository storage:
|
||||
|
||||
```yaml
|
||||
volumes:
|
||||
- ./workspace:/workspace
|
||||
- opencode-workspace:/workspace
|
||||
```
|
||||
|
||||
All cloned repositories are stored here. The directory is created automatically.
|
||||
All cloned repositories are stored here. Uses a named volume for data persistence across container recreations.
|
||||
|
||||
### Data
|
||||
|
||||
@@ -119,7 +122,7 @@ Database and configuration:
|
||||
|
||||
```yaml
|
||||
volumes:
|
||||
- ./data:/app/data
|
||||
- opencode-data:/app/data
|
||||
```
|
||||
|
||||
Contains:
|
||||
@@ -127,16 +130,7 @@ Contains:
|
||||
- User settings
|
||||
- Session data
|
||||
|
||||
### OpenCode Cache
|
||||
|
||||
OpenCode runtime cache:
|
||||
|
||||
```yaml
|
||||
volumes:
|
||||
- opencode-cache:/root/.opencode
|
||||
```
|
||||
|
||||
Using a named volume for better performance.
|
||||
Uses a named volume for data persistence.
|
||||
|
||||
## Environment Variables
|
||||
|
||||
@@ -174,10 +168,11 @@ The container includes health checks:
|
||||
|
||||
```yaml
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:5003/health"]
|
||||
test: ["CMD", "curl", "-f", "http://localhost:5003/api/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
timeout: 3s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
```
|
||||
|
||||
Check health status:
|
||||
|
||||
@@ -11,8 +11,7 @@ Complete reference for all configuration options.
|
||||
| `ADMIN_PASSWORD` | Pre-configured admin password | - |
|
||||
| `ADMIN_PASSWORD_RESET` | Set to `true` to reset admin password | `false` |
|
||||
| `AUTH_TRUSTED_ORIGINS` | Comma-separated list of trusted origins (frontend + backend) | `http://localhost:5173,http://localhost:5003` |
|
||||
| `AUTH_SECURE_COOKIES` | Use secure cookies (HTTPS only) | `true` in prod |
|
||||
| `AUTH_SECURE_COOKIES` | Use secure cookies (HTTPS only) | `true` in prod |
|
||||
| `AUTH_SECURE_COOKIES` | Use secure cookies (HTTPS only) | `true` in prod, `false` in dev |
|
||||
|
||||
## OAuth Providers
|
||||
|
||||
@@ -71,12 +70,65 @@ When configured, users can enable push notifications in Settings → Notificatio
|
||||
| Variable | Description | Default |
|
||||
|----------|-------------|---------|
|
||||
| `PORT` | Server port | `5003` |
|
||||
| `HOST` | Server bind address | `0.0.0.0` |
|
||||
| `NODE_ENV` | Environment (`development` or `production`) | `development` |
|
||||
| `WORKSPACE_PATH` | Path to workspace directory | `/workspace` |
|
||||
| `CORS_ORIGIN` | CORS origin for frontend | `http://localhost:5173` |
|
||||
| `LOG_LEVEL` | Logging level | `info` |
|
||||
| `DEBUG` | Enable debug logging | `false` |
|
||||
|
||||
## Database
|
||||
|
||||
| Variable | Description | Default |
|
||||
|----------|-------------|---------|
|
||||
| `DATABASE_PATH` | Path to SQLite database file | `./data/opencode.db` |
|
||||
|
||||
## Workspace
|
||||
|
||||
| Variable | Description | Default |
|
||||
|----------|-------------|---------|
|
||||
| `WORKSPACE_PATH` | Path to workspace directory | `./workspace` (Docker: `/workspace`) |
|
||||
|
||||
## OpenCode Server
|
||||
|
||||
| Variable | Description | Default |
|
||||
|----------|-------------|---------|
|
||||
| `OPENCODE_SERVER_PORT` | Port for the OpenCode CLI server | `5551` |
|
||||
| `OPENCODE_HOST` | OpenCode server bind address | `127.0.0.1` |
|
||||
|
||||
## Timeouts
|
||||
|
||||
| Variable | Description | Default |
|
||||
|----------|-------------|---------|
|
||||
| `PROCESS_START_WAIT_MS` | Wait time for OpenCode process to start | `2000` |
|
||||
| `PROCESS_VERIFY_WAIT_MS` | Wait time for process health verification | `1000` |
|
||||
| `HEALTH_CHECK_INTERVAL_MS` | Health check polling interval | `5000` |
|
||||
| `HEALTH_CHECK_TIMEOUT_MS` | Health check timeout | `30000` |
|
||||
|
||||
## File Limits
|
||||
|
||||
| Variable | Description | Default |
|
||||
|----------|-------------|---------|
|
||||
| `MAX_FILE_SIZE_MB` | Maximum file size for reading/preview | `50` |
|
||||
| `MAX_UPLOAD_SIZE_MB` | Maximum upload file size | `50` |
|
||||
|
||||
## Frontend (Vite)
|
||||
|
||||
| Variable | Description | Default |
|
||||
|----------|-------------|---------|
|
||||
| `VITE_API_URL` | Backend API URL for frontend | `http://localhost:5003` |
|
||||
| `VITE_SERVER_PORT` | Backend port hint for frontend | `5003` |
|
||||
| `VITE_OPENCODE_PORT` | OpenCode server port hint | `5551` |
|
||||
| `VITE_MAX_FILE_SIZE_MB` | File size limit for frontend | `50` |
|
||||
| `VITE_MAX_UPLOAD_SIZE_MB` | Upload size limit for frontend | `50` |
|
||||
|
||||
## Example .env File
|
||||
|
||||
```bash
|
||||
# Server
|
||||
PORT=5003
|
||||
HOST=0.0.0.0
|
||||
NODE_ENV=development
|
||||
|
||||
# Required for production
|
||||
AUTH_SECRET=generate-with-openssl-rand-base64-32
|
||||
|
||||
|
||||
@@ -109,12 +109,7 @@ On first OAuth login:
|
||||
|
||||
### Linking Accounts
|
||||
|
||||
If you have an existing password account:
|
||||
|
||||
1. Log in with password
|
||||
2. Go to **Settings > Connected Accounts**
|
||||
3. Click **Connect** for a provider
|
||||
4. Authorize the connection
|
||||
If you have an existing password account, logging in with an OAuth provider that uses the same email will link the accounts automatically.
|
||||
|
||||
## Production Considerations
|
||||
|
||||
|
||||
Reference in new issue
Block a user