Skip to content

Commit a4d0e8a

Browse files
committed
more docs update
1 parent b3882d4 commit a4d0e8a

54 files changed

Lines changed: 1236 additions & 5180 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

DOCS_REVIEW.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Docs Review (2026-01-29)
2+
3+
This document tracks documentation mismatches found during the docs site audit and the fixes applied.
4+
5+
## Resolved
6+
7+
- CLI usage drift (removed `rack-gateway convox` wrapper; updated commands and flags).
8+
- Native Convox CLI examples now include the required `/api/v1/rack-proxy` base path.
9+
- API endpoint reference updated to match `internal/gateway/routes` and `/openapi.json`.
10+
- Removed references to non-existent `/api/v1/health/ready` endpoint.
11+
- CLI auth flow corrected (gateway callback + CLI polling).
12+
- Session cookie name updated to `session_token`.
13+
- CLI env vars corrected to `RACK_GATEWAY_RACK`, `RACK_GATEWAY_URL`, `RACK_GATEWAY_API_TOKEN`.
14+
- RBAC role list updated to include `cicd` and correct permission strings.
15+
- Environment variable reference updated with missing keys and correct setting names.
16+
- Docker and database docs updated to use `rack-gateway-api` and correct schema/table names.
17+
- Dev docs updated with correct OpenAPI artifact locations and codegen paths.
18+
- Monitoring docs corrected (audit logs are JSON; general logs are text).
19+
- `docs/README.md` replaced with real docs site overview.
20+
- Broken Convox reference link fixed by removing stale reference and pointing to current docs.
21+
- Web UI docs updated to match actual navigation and capabilities:
22+
- Rack overview instead of “dashboard”.
23+
- Users, API tokens, audit logs, settings pages reflect real columns and actions.
24+
- Global settings reflect actual cards (MFA, destructive actions, session timeout, deploy approvals, VCS/CI defaults).
25+
- API token docs updated (format `rgw_`, permissions model, CLI env vars, UI columns).
26+
- MFA docs updated to match Account Security UI, backup code behavior, trusted device controls, and CLI usage.
27+
- Slack integration docs updated to use real audit action names (underscores) and deploy-approval alert config.
28+
- Deploy approvals docs updated:
29+
- CircleCI example uses `rack-gateway deploy` and correct app settings location.
30+
- Workflow doc uses rack-gateway commands for build/promote.
31+
- Deploy approvals workflow audit trail and approval window env var corrected.
32+
- GitHub integration docs updated with correct setting keys and PR comment behavior.
33+
34+
## Remaining
35+
36+
- None identified in this pass.

README.md

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ for managing multiple racks, monitoring and alerts, workflows for CI/CD, etc.
4848

4949
- **[docs/DEPLOY.md](docs/DEPLOY.md)** - Production deployment guide
5050
- **[docs/CONFIGURATION.md](docs/CONFIGURATION.md)** - All environment variables and options
51-
- **[docs/CONVOX_REFERENCE.md](docs/CONVOX_REFERENCE.md)** - How Convox works
51+
- **[docs/legacy/CONVOX_REFERENCE.md](docs/legacy/CONVOX_REFERENCE.md)** - How Convox works
5252

5353
## Features
5454

@@ -93,9 +93,9 @@ task dev
9393
# Login (opens mock OAuth in browser)
9494
./bin/rack-gateway login staging http://localhost:8447
9595

96-
# Run convox commands through the gateway
97-
./bin/rack-gateway convox apps
98-
./bin/rack-gateway convox ps
96+
# Run Convox commands through the gateway
97+
./bin/rack-gateway apps
98+
./bin/rack-gateway ps
9999
```
100100

101101
### Prerequisites
@@ -182,29 +182,29 @@ The gateway acts as a transparent proxy that speaks the Convox API protocol. It
182182

183183
```bash
184184
# For CI/CD with API token
185-
export RACK_URL="https://convox:<api-token>@gateway.example.com"
185+
export RACK_URL="https://convox:<api-token>@gateway.example.com/api/v1/rack-proxy"
186186
convox apps # Uses standard convox CLI directly
187187

188188
# For developers with session token
189-
export RACK_URL="https://convox:<session-token>@gateway.example.com"
189+
export RACK_URL="https://convox:<session-token>@gateway.example.com/api/v1/rack-proxy"
190190
convox apps # Uses standard convox CLI directly
191191
```
192192

193193
#### Option 2: rack-gateway CLI Wrapper (Convenience)
194194

195195
```bash
196-
# Use our wrapper for easier multi-rack management
196+
# Use our CLI for easier multi-rack management
197197
rack-gateway login staging https://gateway.example.com
198-
rack-gateway convox apps # Automatically sets RACK_URL with stored token
198+
rack-gateway apps # Automatically proxies via the gateway
199199

200200
# Set up convenient shell alias
201-
alias cx="rack-gateway convox"
202-
cx apps
203-
cx ps
204-
cx deploy
201+
alias cg="rack-gateway"
202+
cg apps
203+
cg ps
204+
cg deploy
205205
```
206206

207-
The `rack-gateway` CLI wrapper is optional - it just provides:
207+
The `rack-gateway` CLI is optional if you prefer the native Convox CLI. It provides:
208208

209209
- Automatic token management
210210
- Multi-rack configuration
@@ -225,16 +225,16 @@ rack-gateway login staging https://gateway.example.com
225225
### Running Convox Commands
226226

227227
```bash
228-
# All convox commands go through "rack-gateway convox"
229-
rack-gateway convox apps
230-
rack-gateway convox ps
231-
rack-gateway convox deploy
232-
233-
# With the cx alias:
234-
cx apps
235-
cx ps
236-
cx deploy
237-
cx logs -f
228+
# Convox commands are available directly
229+
rack-gateway apps
230+
rack-gateway ps
231+
rack-gateway deploy
232+
233+
# With the cg alias:
234+
cg apps
235+
cg ps
236+
cg deploy
237+
cg logs -f
238238
```
239239

240240
### Managing Racks
@@ -259,8 +259,8 @@ cg switch eu-west
259259

260260
The CLI determines which rack to use in this order:
261261

262-
1. `--rack` flag: `rack-gateway --rack production convox apps`
263-
2. Environment variable: `RACK_GATEWAY_RACK=production cx apps`
262+
1. `--rack` flag: `rack-gateway --rack production apps`
263+
2. Environment variable: `RACK_GATEWAY_RACK=production rack-gateway apps`
264264
3. Current rack stored in `~/.config/rack-gateway/config.json`
265265

266266
### Generate shell completions:
@@ -302,6 +302,7 @@ The CLI stores its configuration separately:
302302
- **ops**: Restart apps, view env (via releases), manage processes
303303
- **deployer**: Full deployment permissions (builds/releases), non-destructive
304304
- **admin**: Complete access to all operations
305+
- **cicd**: Automation tokens only (not assignable to human users)
305306

306307
### Permissions
307308

docs/README.md

Lines changed: 22 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,34 @@
1-
# Starlight Starter Kit: Basics
1+
# Rack Gateway Docs
22

3-
[![Built with Starlight](https://astro.badg.es/v2/built-with-starlight/tiny.svg)](https://starlight.astro.build)
3+
This directory contains the Astro/Starlight documentation site for Rack Gateway.
44

5-
```
6-
bun create astro@latest -- --template starlight
7-
```
5+
## Content
86

9-
> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
7+
- Docs live in `docs/src/content/docs/`
8+
- Static assets live in `docs/public/`
109

11-
## 🚀 Project Structure
10+
## Development
1211

13-
Inside of your Astro + Starlight project, you'll see the following folders and files:
12+
From the repository root:
1413

14+
```bash
15+
cd docs
16+
bun install
17+
bun dev
1518
```
16-
.
17-
├── public/
18-
├── src/
19-
│ ├── assets/
20-
│ ├── content/
21-
│ │ └── docs/
22-
│ └── content.config.ts
23-
├── astro.config.mjs
24-
├── package.json
25-
└── tsconfig.json
26-
```
27-
28-
Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed as a route based on its file name.
2919

30-
Images can be added to `src/assets/` and embedded in Markdown with a relative link.
20+
The dev server prints the local URL on startup.
3121

32-
Static assets, like favicons, can be placed in the `public/` directory.
22+
## Build
3323

34-
## 🧞 Commands
35-
36-
All commands are run from the root of the project, from a terminal:
37-
38-
| Command | Action |
39-
| :------------------------ | :----------------------------------------------- |
40-
| `bun install` | Installs dependencies |
41-
| `bun dev` | Starts local dev server at `localhost:4321` |
42-
| `bun build` | Build your production site to `./dist/` |
43-
| `bun preview` | Preview your build locally, before deploying |
44-
| `bun astro ...` | Run CLI commands like `astro add`, `astro check` |
45-
| `bun astro -- --help` | Get help using the Astro CLI |
24+
```bash
25+
cd docs
26+
bun build
27+
```
4628

47-
## 👀 Want to learn more?
29+
## Preview
4830

49-
Check out [Starlight’s docs](https://starlight.astro.build/), read [the Astro documentation](https://docs.astro.build), or jump into the [Astro Discord server](https://astro.build/chat).
31+
```bash
32+
cd docs
33+
bun preview
34+
```

docs/src/content/docs/concepts/rbac-principles.mdx

Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ Specific actions that can be performed. Rack Gateway uses a hierarchical permiss
5454

5555
```
5656
convox:* # All Convox permissions
57-
convox:apps:* # All app-related permissions
58-
convox:apps:list # List applications
59-
convox:apps:create # Create applications
60-
convox:releases:promote # Promote releases (deploy)
57+
convox:app:* # All app-related permissions
58+
convox:app:list # List applications
59+
convox:app:create # Create applications
60+
convox:release:promote # Promote releases (deploy)
6161
```
6262

6363
### Role-Permission Mapping
@@ -183,13 +183,13 @@ What actions can be performed on each resource?
183183
Combine resources and operations:
184184

185185
```
186-
apps:list
187-
apps:create
188-
apps:delete
189-
deploys:create
190-
deploys:promote
191-
logs:view
192-
users:create
186+
convox:app:list
187+
convox:app:create
188+
convox:app:delete
189+
convox:release:create
190+
convox:release:promote
191+
convox:log:read
192+
gateway:user:create
193193
```
194194

195195
### Step 4: Define Roles
@@ -198,22 +198,23 @@ Group permissions by job function:
198198

199199
```yaml
200200
viewer:
201-
- apps:list
202-
- logs:view
201+
- convox:app:list
202+
- convox:log:read
203203

204204
developer:
205-
- apps:list
206-
- apps:update
207-
- logs:view
208-
- exec:run
205+
- convox:app:list
206+
- convox:app:update
207+
- convox:log:read
208+
- convox:process:exec
209209

210210
operator:
211-
- apps:*
212-
- deploys:*
213-
- logs:*
211+
- convox:app:*
212+
- convox:release:*
213+
- convox:log:*
214214

215215
admin:
216-
- *:*
216+
- convox:*:*
217+
- gateway:*:*
217218
```
218219
219220
### Step 5: Assign Roles to Users
@@ -235,27 +236,27 @@ users:
235236
| Role | Purpose | Key Permissions |
236237
|------|---------|-----------------|
237238
| **Admin** | Full system access | All permissions including user management |
238-
| **Operator** | Production operations | Deploy, scale, environment management |
239-
| **Developer** | Development work | Run commands, view logs, limited writes |
239+
| **Deployer** | Production operations | Deploy, scale, environment management |
240+
| **Ops** | Operational work | Run commands, view logs, manage processes |
240241
| **Viewer** | Read-only access | View apps, logs, status |
241242
242243
### Permission Structure
243244
244245
Rack Gateway uses a hierarchical permission system:
245246
246247
```
247-
gateway:* # All gateway permissions
248-
gateway:admin:* # Admin functions
249-
gateway:admin:users # User management
250-
gateway:admin:tokens # API token management
251-
gateway:admin:settings # Settings management
252-
253-
convox:* # All Convox permissions
254-
convox:apps:* # App management
255-
convox:builds:* # Build operations
256-
convox:releases:* # Release/deploy operations
257-
convox:env:* # Environment variables
258-
convox:exec:* # Command execution
248+
gateway:* # All gateway permissions
249+
gateway:user:* # User management
250+
gateway:api_token:* # API token management
251+
gateway:deploy_approval_request:* # Deploy approvals
252+
gateway:setting:* # Settings (individual)
253+
254+
convox:* # All Convox permissions
255+
convox:app:* # App management
256+
convox:build:* # Build operations
257+
convox:release:* # Release/deploy operations
258+
convox:env:* # Environment variables
259+
convox:process:* # Process operations
259260
```
260261

261262
### Role Assignment

0 commit comments

Comments
 (0)