Skip to content

Commit 0cb80f7

Browse files
committed
chore: update documentation for improved clarity and organization
1 parent e4e9059 commit 0cb80f7

9 files changed

Lines changed: 146 additions & 12 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ One TUI can manage multiple VPS servers via profiles. Create or switch profiles
2626

2727
[deeploy.sh/docs](https://deeploy.sh/docs)
2828

29+
`content/docs` is the source of truth for setup, operations, domains, and pod configuration.
30+
2931
## Development
3032

3133
```bash
@@ -34,9 +36,7 @@ task dev:tui # TUI client
3436
task dev:docs # Docs website
3537
```
3638

37-
`docker-compose.override.yml` applies local Traefik dev settings (HTTP + dashboard).
38-
It is auto-loaded by Docker Compose during normal local `docker compose` commands.
39-
In dev, it also disables the `deeploy` container so you can run the server via `go run ./cmd/server`.
39+
`docker-compose.override.yml` applies local Traefik dev settings and is auto-loaded by Docker Compose in local runs.
4040

4141
## License
4242

content/docs/configuration.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
title: Configuration
3+
description: Server secrets and rotation
4+
order: 3
5+
---
6+
7+
deeploy generates secure server secrets automatically on first install.
8+
9+
## Server Secrets
10+
11+
- `JWT_SECRET`
12+
- `ENCRYPTION_KEY`
13+
14+
The install script generates both automatically on first install and writes them to `/opt/deeploy/.env`.
15+
16+
You normally do not need to touch them.
17+
18+
## Important
19+
20+
- Change `ENCRYPTION_KEY` only before you store real data.
21+
- If you change `ENCRYPTION_KEY` later, previously encrypted values in the database cannot be decrypted.
22+
- Changing `JWT_SECRET` logs out existing sessions (users must log in again).
23+
24+
## If You Must Change Secrets
25+
26+
1. SSH to your server.
27+
2. Open `/opt/deeploy/.env`.
28+
3. Replace the secret(s).
29+
4. Restart the stack:
30+
```bash
31+
cd /opt/deeploy
32+
docker compose up -d --force-recreate
33+
```
34+
5. Verify login and app behavior.

content/docs/deploying.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Deploying
33
description: Deploy your first app
4-
order: 3
4+
order: 4
55
---
66

77
Deploy your first application step by step.
@@ -24,16 +24,32 @@ A pod is a single deployable application. One pod = one container.
2424
- **Branch** - The branch to deploy (default: `main`)
2525
- **Dockerfile** - Path to your Dockerfile (default: `Dockerfile`)
2626

27-
For private repositories, you'll need to add a [Git Token](/docs/private-repos) first.
27+
For private repositories, select a Git token in the pod form.
28+
Git tokens are managed in **Settings → Tokens** (create/edit/delete there).
2829

29-
## 3. Add a Domain
30+
If your app needs runtime config, add it in [Pod Environment Variables](/docs/pod-env-vars).
31+
32+
## 3. Set Pod Vars (Optional)
33+
34+
If your app needs runtime variables:
35+
36+
1. Open the pod
37+
2. Go to **Vars** (`4`)
38+
3. Press `e` to edit
39+
4. Save with `Ctrl+S`
40+
41+
Then restart or redeploy the pod to apply changes.
42+
43+
## 4. Add a Domain
3044

3145
Your pod needs a domain to be accessible. You have two options:
3246

3347
- **Auto-generated** - Instant subdomain like `pod-abc123.1.2.3.4.sslip.io`
3448
- **Custom** - Your own domain like `myapp.example.com` (requires [DNS setup](/docs/domains))
3549

36-
## 4. Deploy
50+
After domain changes, run **Deploy** or **Restart** so routing updates are applied.
51+
52+
## 5. Deploy / Restart
3753

3854
Hit "Deploy" and watch the build logs. The process:
3955

@@ -54,4 +70,6 @@ Once complete, your app is live at the domain URL.
5470

5571
**Redeploy** - Pull latest code and rebuild
5672

73+
**Vars** - Edit runtime environment variables for the pod
74+
5775
To update your app, just push to your repository and hit "Deploy" again.

content/docs/domains.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Domains
33
description: Custom domains and HTTPS setup
4-
order: 4
4+
order: 6
55
---
66

77
## Server Domain
@@ -29,10 +29,21 @@ order: 4
2929

3030
**Note:** Ports 80 and 443 must be open on your server for SSL to work.
3131

32+
### Verify Server HTTPS
33+
34+
After setting the server domain:
35+
36+
1. Confirm your TUI profile/server URL uses `https://...`
37+
2. Confirm certificate provisioning completed successfully
38+
3. If it fails, verify DNS propagation and that ports 80/443 are open
39+
3240
## Pod Domains
3341

3442
Each pod needs at least one domain to be accessible.
3543

44+
Domain changes are not applied to a running container automatically.
45+
After adding, editing, or deleting pod domains, run **Deploy** or **Restart** to apply routing changes.
46+
3647
### Auto-Generated Domains
3748

3849
The quickest way to get started. Deeploy generates a subdomain using [sslip.io](https://sslip.io):
@@ -58,7 +69,7 @@ For production apps, use your own domain:
5869

5970
Pod → Domains → New → Enter `myapp.example.com`
6071

61-
3. **Deploy**
72+
3. **Deploy or Restart**
6273

6374
SSL certificate is automatically provisioned.
6475

content/docs/getting-started.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ order: 2
66

77
Get up and running with deeploy in minutes.
88

9+
No manual environment-variable setup is required for the standard installation.
10+
911
## Requirements
1012

1113
**Server (VPS)**
@@ -25,6 +27,8 @@ SSH into your VPS and run:
2527
curl -fsSL https://deeploy.sh/server.sh | sudo bash
2628
```
2729

30+
On first install, the script generates required server secrets automatically.
31+
2832
### Options
2933

3034
```bash
@@ -39,6 +43,8 @@ curl -fsSL https://deeploy.sh/server.sh | sudo bash -s v0.1.0
3943

4044
SQLite is used by default - zero configuration needed.
4145

46+
For full server config details, see [Configuration](/docs/configuration).
47+
4248
## Install TUI
4349

4450
On your local machine:
@@ -58,6 +64,8 @@ curl -fsSL https://deeploy.sh/tui.sh | bash -s v0.1.0
5864

5965
Run `deeploy` to launch the TUI and connect to your server.
6066

67+
After connecting, set your [Server Domain](/docs/domains) to enable HTTPS between TUI and server.
68+
6169
After first login, you can add more servers as separate profiles and switch between them later.
6270
This lets you manage multiple VPS instances from one local TUI setup.
6371

content/docs/pod-env-vars.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
title: Pod Environment Variables
3+
description: Manage runtime environment variables for your pods
4+
order: 7
5+
---
6+
7+
Use Pod Environment Variables (Vars tab) to provide runtime config to your app containers.
8+
9+
## Where to Edit
10+
11+
In the TUI:
12+
13+
1. Open a pod
14+
2. Switch to the **Vars** tab (`4` or `[` / `]`)
15+
3. Press `e` to edit
16+
4. Enter variables in `KEY=value` format (one per line)
17+
5. Press `Ctrl+S` to save
18+
19+
## Format Rules
20+
21+
- One variable per line
22+
- Format must be `KEY=value`
23+
- Empty lines are ignored
24+
- Duplicate keys are resolved by last entry
25+
26+
## When Changes Apply
27+
28+
Saved vars are stored for the pod and applied to the container on deploy/redeploy/restart.
29+
30+
Recommended flow after changes:
31+
32+
1. Save vars in **Vars** tab
33+
2. Trigger **Restart** (`R`) or **Deploy** (`D`)
34+
35+
## Security Notes
36+
37+
- Pod vars are stored encrypted server-side
38+
- They are used for container runtime environment injection
39+
- Keep secrets out of repository files and Dockerfiles when possible
40+
41+
## Common Mistakes
42+
43+
- Missing `=` in a line
44+
- Trailing spaces in keys
45+
- Editing vars but forgetting to restart/redeploy
46+
- Setting app vars in server config instead of pod vars

content/docs/private-repos.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Private Repositories
33
description: Deploy from private Git repositories
4-
order: 5
4+
order: 8
55
---
66

77
To deploy from private repositories, you need to add a Git token.

content/docs/tui.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Using the TUI
33
description: Navigate the terminal interface
4-
order: 6
4+
order: 5
55
---
66

77
The deeploy TUI (Terminal User Interface) is built for keyboard-driven workflows.
@@ -46,6 +46,8 @@ Inside a pod, use:
4646
- `n`, `g`, `o`, `e`, `d` for domain actions (Domains tab)
4747
- `e` to edit vars, `Ctrl+S` to save, `Esc` to cancel (Vars tab)
4848

49+
For detailed vars behavior and best practices, see [Pod Environment Variables](/docs/pod-env-vars).
50+
4951
## Themes
5052

5153
Open themes from the **Settings** panel:

content/docs/updating.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Updating
33
description: Update deeploy to the latest version
4-
order: 7
4+
order: 9
55
---
66

77
## Update Server
@@ -14,6 +14,12 @@ curl -fsSL https://deeploy.sh/server.sh | sudo bash
1414

1515
This pulls the latest Docker image and restarts the server. Your data is preserved.
1616

17+
What is preserved:
18+
19+
- Existing `.env` with your generated secrets
20+
- Database data in mounted volumes
21+
- Existing deployment records/projects/pods
22+
1723
### Specific Version
1824

1925
```bash
@@ -37,3 +43,12 @@ curl -fsSL https://deeploy.sh/tui.sh | bash -s v0.2.0
3743
## Check Version
3844

3945
The TUI shows your current version and the latest available version in the Settings info panel and status/header area.
46+
47+
## Quick Verification After Update
48+
49+
1. Check health endpoint:
50+
```bash
51+
curl -fsSL http://YOUR_SERVER_IP:8090/api/health
52+
```
53+
2. Open the TUI and confirm server/version info is visible.
54+
3. Open an existing pod and verify logs/deploy actions work.

0 commit comments

Comments
 (0)