Skip to content

Commit fbba1ab

Browse files
authored
docs(setup): align quickstart docker flow (#47)
* docs(setup): align quickstart docker flow * docs(setup): add health recovery guidance
1 parent fb1e5ad commit fbba1ab

2 files changed

Lines changed: 31 additions & 8 deletions

File tree

docs/setup/quickstart.md

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,47 @@ cd gordie
2121
uv run gordie init
2222
```
2323

24-
The setup wizard writes `.env`, verifies Docker is installed, prompts for your chat medium, LLM provider, Yahoo app credentials, and skips hosted billing unless you pass `--hosted`.
24+
The setup wizard writes `.env`, verifies Docker is installed, prompts for your chat medium, LLM provider, Yahoo app credentials, starts the Docker Compose stack, and skips hosted billing unless you pass `--hosted`.
2525
It also detects `ngrok`, offers to install it when it is missing, asks for your ngrok authtoken, briefly starts ngrok to detect your stable dev-domain URL, and writes that URL as `OAUTH_BASE_URL`. If you skip that automation, enter an existing public HTTPS URL and ngrok authtoken manually. The Docker connector sends tunnel traffic to `http://server:8000`.
2626

27-
## 2. Start Postgres + the server
27+
## 2. Confirm Postgres + the server are running
2828

2929
```bash
30-
docker compose up -d
3130
curl http://localhost:8000/health
3231
# {"status":"ok"}
3332
```
3433

3534
The server applies Alembic migrations automatically before it starts accepting requests. The ngrok connector starts in the same Compose stack, so your public hostname should reach the same `/health` endpoint.
3635

36+
If the health check fails, check the running services first:
37+
38+
```bash
39+
docker compose ps
40+
docker compose logs -f server ngrok
41+
```
42+
43+
Common fixes:
44+
- Docker is not running: start Docker Desktop, then run `docker compose up -d --build`.
45+
- Port `8000` is occupied: stop the other process or change the server port before restarting Compose.
46+
- Startup validation fails: fix the missing or invalid `.env` value shown in the server log, then rerun `uv run gordie init`.
47+
- ngrok fails: confirm `NGROK_AUTHTOKEN` in `.env`, then check `docker compose logs -f ngrok`.
48+
- Public health fails: run `curl "$OAUTH_BASE_URL/health"` and confirm Yahoo uses the same base URL plus `/callback`.
49+
50+
Run Compose manually only if setup was interrupted before Docker startup, you intentionally skipped startup, you changed `.env` or `docker-compose.yml` after setup, or the services are stopped later:
51+
52+
```bash
53+
docker compose up -d --build
54+
curl http://localhost:8000/health
55+
```
56+
3757
## 3. Send Gordie a message without configuring email
3858

3959
The fastest sanity check:
4060

4161
```bash
4262
uv run python scripts/message_agent.py \
43-
--email you@example.com \
44-
--message "What can you do?"
63+
you@example.com \
64+
"What can you do?"
4565
```
4666

4767
Output appears in `server.log` (tail it: `docker compose logs -f server`).

docs/setup/yahoo-oauth.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,21 @@ YAHOO_CLIENT_ID=<consumer key>
4747
YAHOO_CLIENT_SECRET=<consumer secret>
4848
```
4949

50-
Then start or restart the stack:
50+
`uv run gordie init` starts the Docker Compose stack by default. Restart it manually only if you changed `.env` after setup, skipped Docker startup, or the services are stopped:
5151

5252
```bash
53-
docker compose up -d
53+
docker compose up -d --build
5454
```
5555

56+
If local health fails, run `docker compose ps` and `docker compose logs -f server ngrok`.
57+
If the public callback fails, run `curl "$OAUTH_BASE_URL/health"` and confirm Yahoo is configured with `OAUTH_BASE_URL` plus `/callback`.
58+
5659
## 4. Connect your league
5760

5861
Send a first message to Gordie:
5962

6063
```bash
61-
uv run python scripts/message_agent.py --email you@example.com --message "hi"
64+
uv run python scripts/message_agent.py you@example.com "hi"
6265
```
6366

6467
Gordie replies with an OAuth link. Visit the URL, approve, get redirected back to `/callback?code=...`. Tokens land in `data/platform.db` (or the `yahoo_tokens` table in your Postgres if you've migrated to it).

0 commit comments

Comments
 (0)