Skip to content

Commit bcbbe92

Browse files
authored
Merge pull request #111 from deeploy-sh/chore/remove-postgres
chore: remove postgres, clearify/simplify docs
2 parents 4abc6ae + 0cb80f7 commit bcbbe92

22 files changed

Lines changed: 202 additions & 215 deletions

.env.example

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,7 @@
1-
# Shared
2-
APP_ENV=development
3-
4-
# Docs
5-
GITHUB_TOKEN=
6-
RESEND_API_KEY=
7-
RESEND_AUDIENCE_ID=
8-
91
# Server - Required
102
JWT_SECRET=your-secret-key-min-32-characters
113
ENCRYPTION_KEY=your-32-character-encryption-key
124

13-
# Database - SQLite (default)
14-
DB_DRIVER=sqlite
15-
DB_CONNECTION=./data/deeploy.db?_pragma=foreign_keys(1)&_pragma=journal_mode(WAL)
16-
17-
# Database - PostgreSQL (optional)
18-
#DB_DRIVER=pgx
19-
#DB_CONNECTION=postgres://deeploy:deeploy@localhost:5432/deeploy?sslmode=disable
5+
# Notes:
6+
# - APP_ENV is set by runtime context (production in docker-compose, development in local task).
7+
# - All other server settings use code defaults (SQLite, port, build paths, traefik config path).

README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,17 @@ 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
32-
task dev:server # Server (SQLite as default)
33-
task dev:server:postgres # Server (PostgreSQL - confirgure .env)
34+
task dev:server # Server
3435
task dev:tui # TUI client
3536
task dev:docs # Docs website
3637
```
3738

38-
For PostgreSQL, set `DB_DRIVER=pgx` in `.env`.
39-
40-
```bash
41-
42-
```
39+
`docker-compose.override.yml` applies local Traefik dev settings and is auto-loaded by Docker Compose in local runs.
4340

4441
## License
4542

Taskfile.yml

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,19 @@ vars:
77
tasks:
88
# --- Infrastructure ---
99
infra:up:
10-
desc: Start Traefik (for domain testing)
10+
desc: Start Traefik (dev config via docker-compose.override.yml)
1111
cmds:
1212
- docker compose up -d traefik
1313

14-
infra:postgres:
15-
desc: Start PostgreSQL (for DB_DRIVER=pgx)
16-
cmds:
17-
- docker compose --profile postgres up -d postgres
18-
1914
infra:down:
2015
desc: Stop all infrastructure
2116
cmds:
22-
- docker compose --profile postgres down
17+
- docker compose down
2318

2419
infra:reset:
2520
desc: Reset infrastructure (delete volumes and restart)
2621
cmds:
27-
- docker compose --profile postgres down -v
22+
- docker compose down -v
2823

2924
# --- Install ---
3025
install:tui:
@@ -54,11 +49,6 @@ tasks:
5449
cmds:
5550
- task --parallel tailwind templ:server
5651

57-
dev:server:postgres:
58-
desc: Start dev server (PostgreSQL - configure .env)
59-
cmds:
60-
- task --parallel tailwind templ:server infra:postgres
61-
6252
dev:docs:
6353
desc: Docs website
6454
cmds:

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: 7 additions & 4 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,10 +43,7 @@ curl -fsSL https://deeploy.sh/server.sh | sudo bash -s v0.1.0
3943

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

42-
For PostgreSQL (advanced users):
43-
```bash
44-
curl -fsSL https://deeploy.sh/server.sh | sudo bash -s -- --postgres
45-
```
46+
For full server config details, see [Configuration](/docs/configuration).
4647

4748
## Install TUI
4849

@@ -63,6 +64,8 @@ curl -fsSL https://deeploy.sh/tui.sh | bash -s v0.1.0
6364

6465
Run `deeploy` to launch the TUI and connect to your server.
6566

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

content/docs/introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ order: 1
1313
- Instant domains via sslip.io wildcard DNS
1414
- Terminal-first UI (TUI)
1515
- Self-hosted, you own your data
16-
- SQLite by default, PostgreSQL optional
16+
- SQLite
1717

1818
## Currently Supported
1919

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.

0 commit comments

Comments
 (0)