Skip to content

docs(getting-started): deploy from registry images + upgrade guide#6

Open
Lalatenduswain wants to merge 1 commit into
ferriskey:mainfrom
Lalatenduswain:docs/deploy-from-registry-images
Open

docs(getting-started): deploy from registry images + upgrade guide#6
Lalatenduswain wants to merge 1 commit into
ferriskey:mainfrom
Lalatenduswain:docs/deploy-from-registry-images

Conversation

@Lalatenduswain

@Lalatenduswain Lalatenduswain commented Jun 10, 2026

Copy link
Copy Markdown

Summary

Addresses ferriskey/ferriskey#1032, which asks two questions the getting-started guide didn't answer:

  1. How to deploy without cloning the whole repo — only via images from a registry.
  2. How to run migrations when upgrading a deployed stack.

Changes

Adds two sections to the English getting-started page:

  • Deploy Without Cloning the Repository — a self-contained docker-compose.yml using only ghcr.io/ferriskey/* images (no build: context, no checkout). It mirrors the repo's registry profile and relies on the migration files baked into the ferriskey-api image, so no source tree is needed. Notes that it can be adapted to a Swarm stack, plus an info callout on pinning image tags for production.
  • Upgrading FerrisKey — a pull → re-run db-migrations → restart flow, with a warning callout on keeping api and db-migrations on the same tag.

Notes

  • The embedded compose was validated as parseable YAML and matches the service/env/image names in the upstream docker-compose.yaml registry profile.
  • Content follows existing MDX conventions (step-group/step, callout with info/warning variants).

Summary by CodeRabbit

  • Documentation
    • Added "Deploy Without Cloning the Repository" guide for Docker Compose-based deployments, including complete configuration examples and setup instructions for database, migrations, API, and web application components.
    • Added "Upgrading FerrisKey" section with step-by-step guidance on the pull, migrate, and restart workflow, including critical warnings about maintaining consistent image tags for stability.

Add a 'Deploy Without Cloning the Repository' section with a self-contained
docker-compose.yml that uses only the published ghcr.io/ferriskey images, and
an 'Upgrading FerrisKey' section covering pull, re-run migrations, and restart.

Addresses ferriskey/ferriskey#1032
@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Documentation update adds two new sections to the getting-started guide: a Docker Compose deployment path using published FerrisKey images from ghcr.io, and an upgrade workflow guide covering image updates and database migrations using the db-migrations service.

Changes

Getting Started Guide Enhancements

Layer / File(s) Summary
Alternative Docker Compose deployment
apps/docs/src/content/docs/discover/default/en/getting-started.mdx
New section describing deployment without cloning the repository, including complete docker-compose.yml example with db, db-migrations, api, and webapp services, explanation that migration files are baked into the API image, and a callout to pin image tags for production.
FerrisKey upgrade workflow
apps/docs/src/content/docs/discover/default/en/getting-started.mdx
New section describing the upgrade path with steps to pull updated images, run migrations safely via the db-migrations service, restart services, and a warning to use matching image tags for api and db-migrations.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A rabbit hops through Docker files with glee,
No cloning needed—just compose and see!
Pull, migrate, restart with grace,
FerrisKey deploys to any place.
Tags aligned, the upgrade's bright,
Getting started made just right! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'docs(getting-started): deploy from registry images + upgrade guide' accurately describes the main changes: adding deployment and upgrade documentation sections to the getting-started guide.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
apps/docs/src/content/docs/discover/default/en/getting-started.mdx (2)

71-76: 💤 Low value

Consider adding the -U flag to the health check for explicitness.

While pg_isready -d ferriskey works, explicitly specifying the user with -U ferriskey makes the health check more consistent with the defined POSTGRES_USER environment variable and clearer about which connection parameters are being tested.

✨ Optional enhancement
     healthcheck:
-      test: ["CMD-SHELL", "pg_isready -d ferriskey"]
+      test: ["CMD-SHELL", "pg_isready -U ferriskey -d ferriskey"]
       interval: 10s
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/docs/src/content/docs/discover/default/en/getting-started.mdx` around
lines 71 - 76, Update the Docker healthcheck command so it explicitly tests the
configured DB user: modify the healthcheck test entry that currently runs
pg_isready -d ferriskey to include the -U flag (pg_isready -d ferriskey -U
ferriskey) so it checks connection parameters consistent with the POSTGRES_USER;
locate the healthcheck block and update the test array entry accordingly.

132-154: ⚖️ Poor tradeoff

Consider documenting expected downtime during upgrades.

The upgrade process will cause brief downtime when the API service restarts with the new image (step 3). For production deployments requiring zero-downtime upgrades, consider adding a note about using rolling updates, blue-green deployments, or Docker Swarm/Kubernetes strategies.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/docs/src/content/docs/discover/default/en/getting-started.mdx` around
lines 132 - 154, Add a short note under the "Restart the application" step
explaining that restarting the API will cause brief downtime and, for production
requiring zero-downtime upgrades, recommend strategies such as rolling updates,
blue‑green deployments, or orchestration solutions (Docker Swarm/Kubernetes) and
link or reference relevant docs; update the "Restart the application" step
content to include this advisory and a brief pointer to the alternative
deployment strategies.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/docs/src/content/docs/discover/default/en/getting-started.mdx`:
- Around line 132-154: Insert a new step titled "Back up your database"
immediately before the existing "Pull the new images" step that tells users to
create and offline backup of the database and store it in a safe location
(mention using the running DB container via docker compose exec and pg_dump as
the method), and note that this backup can be used to restore if migrations
fail; keep the rest of the flow (the "Pull the new images", "Apply new
migrations" which runs db-migrations -> sqlx migrate run, and "Restart the
application" steps) unchanged.

---

Nitpick comments:
In `@apps/docs/src/content/docs/discover/default/en/getting-started.mdx`:
- Around line 71-76: Update the Docker healthcheck command so it explicitly
tests the configured DB user: modify the healthcheck test entry that currently
runs pg_isready -d ferriskey to include the -U flag (pg_isready -d ferriskey -U
ferriskey) so it checks connection parameters consistent with the POSTGRES_USER;
locate the healthcheck block and update the test array entry accordingly.
- Around line 132-154: Add a short note under the "Restart the application" step
explaining that restarting the API will cause brief downtime and, for production
requiring zero-downtime upgrades, recommend strategies such as rolling updates,
blue‑green deployments, or orchestration solutions (Docker Swarm/Kubernetes) and
link or reference relevant docs; update the "Restart the application" step
content to include this advisory and a brief pointer to the alternative
deployment strategies.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b1c98215-10bc-4bce-a91e-5630922b669a

📥 Commits

Reviewing files that changed from the base of the PR and between a042b8b and e4a2e97.

📒 Files selected for processing (1)
  • apps/docs/src/content/docs/discover/default/en/getting-started.mdx

Comment on lines +132 to +154
::::step-group
:::step{title="Pull the new images"}
```bash
docker compose pull
```
:::

:::step{title="Apply new migrations"}
The `db-migrations` service runs `sqlx migrate run`, which only applies migrations that have not run yet — so it is safe to run on every upgrade:

```bash
docker compose up -d db-migrations
```
:::

:::step{title="Restart the application"}
Once migrations complete, recreate the API and web app on the new images:

```bash
docker compose up -d api webapp
```
:::
::::

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Add database backup recommendation before upgrade.

The upgrade workflow does not mention backing up the database before pulling new images and applying migrations. Database backups are a critical safety measure before any schema migration, as migrations can be irreversible and may encounter unexpected issues.

📋 Suggested addition of backup step

Consider adding a step before "Pull the new images":

:::step{title="Back up your database"}
Before upgrading, create a database backup:

\```bash
docker compose exec db pg_dump -U ferriskey ferriskey > backup-$(date +%Y%m%d-%H%M%S).sql
\```

Store this backup in a safe location. In case of migration issues, you can restore from this backup.
:::
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/docs/src/content/docs/discover/default/en/getting-started.mdx` around
lines 132 - 154, Insert a new step titled "Back up your database" immediately
before the existing "Pull the new images" step that tells users to create and
offline backup of the database and store it in a safe location (mention using
the running DB container via docker compose exec and pg_dump as the method), and
note that this backup can be used to restore if migrations fail; keep the rest
of the flow (the "Pull the new images", "Apply new migrations" which runs
db-migrations -> sqlx migrate run, and "Restart the application" steps)
unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants