Skip to content

Commit 40e4ec9

Browse files
committed
Adjust migrations doc
1 parent f8b8a0e commit 40e4ec9

File tree

3 files changed

+41
-15
lines changed

3 files changed

+41
-15
lines changed

docs/gettingstarted.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ SuperStack automatically:
9393
3. Launches PostgREST and Swagger UI
9494
4. Serves everything through Caddy
9595

96+
> 💡 Only Caddy exposes a port – all services are routed through it.
97+
9698
## Change the Docker images to your own (Recommended)
9799

98100
In `compose.yaml`, change the `explodinglabs` images to your own:

docs/index.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ It's perfect for:
4242
Everything runs inside Docker and routes through a single exposed port (via
4343
Caddy), making it easy to develop locally or deploy remotely.
4444

45+
```mermaid
46+
flowchart TD
47+
Caddy["Caddy (API Gateway)"]
48+
Caddy --> Services["Services (PostgREST, Swagger UI + more)"]
49+
Services --> Postgres
50+
```
51+
4552
---
4653

4754
## 📚 What's next?

docs/migrations.md

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,27 @@
1-
# 📜 Migrations
1+
# Build your App
2+
3+
## Project Structure
4+
5+
```
6+
📁 bin/ → Helper scripts (e.g. wrappers for CLI tools)
7+
📁 caddy/ → Custom Caddy configuration and certificates
8+
📁 docs/ → Markdown files for SuperStack documentation
9+
📁 postgres/ → SQL migrations and configuration of the postgres container
10+
📄 compose.yaml → Main Docker Compose config
11+
📄 compose.override.yaml → Optional local overrides (development only)
12+
📄 example.env → Example environment variables — copy to `.env`
13+
📄 LICENSE → License file (MIT)
14+
📄 logo.png → SuperStack logo for README/docs
15+
📄 mkdocs.yml → MkDocs configuration for documentation site
16+
📄 README.md → Overview and quick start for the repository
17+
```
18+
19+
## 📜 Migrations
220

321
SuperStack includes a simple built-in system for managing database schema
422
migrations.
523

6-
## ✍️ Writing Migrations
24+
### ✍️ Writing Migrations
725

826
Place your migration scripts in:
927

@@ -18,7 +36,7 @@ Each file should be:
1836
- Written in plain SQL
1937
- But can include environment variables.
2038

21-
## ▶️ Applying Migrations
39+
### ▶️ Applying Migrations
2240

2341
When the Postgres container starts with no existing data, SuperStack will
2442
automatically run migrations once.
@@ -41,18 +59,7 @@ Already-applied scripts are skipped on subsequent runs.
4159

4260
> 💡 `bin/postgres` is short for `docker compose exec postgres`
4361
44-
## 🔄 Resetting
45-
46-
If you want to start fresh:
47-
48-
```sh
49-
docker compose down --volumes
50-
docker compose up -d
51-
```
52-
53-
This will wipe your database and re-run all migrations from scratch.
54-
55-
## 🔁 Transactions
62+
### 🔁 Transactions
5663

5764
Use `BEGIN;` and `COMMIT;` to wrap migration files when all included
5865
statements are transactional. This ensures that all changes are applied
@@ -101,3 +108,13 @@ ALTER SYSTEM
101108
DISCARD ALL
102109
LOAD
103110
```
111+
112+
### 🔄 Nuke Everything
113+
114+
If you want to start fresh, wipe your database and re-run all migrations from
115+
scratch:
116+
117+
```sh
118+
docker compose down --volumes
119+
docker compose up -d
120+
```

0 commit comments

Comments
 (0)