Skip to content

docker_compose#1773

Closed
Srinath-Vulkunda wants to merge 2 commits into
IgnisDa:mainfrom
Srinath-Vulkunda:dev
Closed

docker_compose#1773
Srinath-Vulkunda wants to merge 2 commits into
IgnisDa:mainfrom
Srinath-Vulkunda:dev

Conversation

@Srinath-Vulkunda
Copy link
Copy Markdown

@Srinath-Vulkunda Srinath-Vulkunda commented May 28, 2026

Aligned Docker Compose config across repo + docs" --body "This PR makes the Docker Compose configuration consistent across the repo compose file, README Quick Start, and docs installation page.\n\nChanges:\n- Updates docker-compose.yml to match the documented setup\n- Updates README Quick Start snippet\n- Updates docs installation snippet and replaces hard-coded admin token with a placeholder\n\nHow to test:\n- docker compose up -d\n- Visit

Summary by CodeRabbit

  • Documentation
    • Updated Quick Start and Installation guides with streamlined Docker Compose setup
    • Application now runs on port 3001 instead of port 8000
    • Setup process now directly references the repository's docker-compose.yml file, eliminating manual configuration steps

Review Change Stack

Copilot AI review requested due to automatic review settings May 28, 2026 08:50
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 28, 2026

Walkthrough

This PR introduces a root-level docker-compose.yml file that consolidates the application and PostgreSQL database service configuration. The Quick Start, Installation, and Pro upgrade documentation sections are updated to reference this shared configuration file, replacing previous inline YAML examples with unified service definitions and standardized port mapping to 3001.

Changes

Docker Compose Configuration and Documentation

Layer / File(s) Summary
Docker Compose service configuration
docker-compose.yml
New docker-compose.yml defines PostgreSQL 18 Alpine service (ryot-db) with persistent volume (postgres_storage) and application service (ryot) using ignisda/ryot:v10 image, configured with admin access token, database connection, and frontend URL, exposing port 3001:8000.
Documentation updates referencing docker-compose.yml
README.md, apps/docs/src/index.md
README Quick Start, Installation section, and Pro upgrade documentation updated to reference the root docker-compose.yml instead of inline examples; environment variables, port mapping, and service names are aligned across all documentation to match the shared configuration.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'docker_compose' is vague and generic; it describes the general topic but doesn't convey the specific intent or main change of the pull request. Consider a more descriptive title such as 'Align Docker Compose configuration across repository and documentation' to clarify the PR's primary objective.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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.

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR introduces a root-level docker-compose.yml file for local development and updates the documentation (README and docs index) to reference it instead of duplicating compose snippets that users had to copy.

Changes:

  • Add a new docker-compose.yml at the repo root with dev-oriented defaults (port 3001, ryot-dev-db container, hardcoded admin token).
  • Update README.md Quick Start to point to the new compose file and reflect new values.
  • Update apps/docs/src/index.md installation snippet to mirror the new compose file.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
docker-compose.yml New root compose file for local/dev use with Postgres and Ryot services.
README.md Quick Start updated to reference the new compose file, new port, and updated env vars.
apps/docs/src/index.md Installation docs updated to align with the new compose file.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md
environment:
- SERVER_ADMIN_ACCESS_TOKEN=CHANGE_ME_TO_A_LONG_RANDOM_STRING
- DATABASE_URL=postgres://postgres:postgres@ryot-db:5432/postgres
SERVER_ADMIN_ACCESS_TOKEN: mysecretkey
Comment thread docker-compose.yml
ports:
- "3001:8000"
environment:
SERVER_ADMIN_ACCESS_TOKEN: mysecretkey
Comment thread apps/docs/src/index.md
services:
ryot-db:
image: postgres:18-alpine # at-least version 15 is required
image: postgres:18-alpine
Comment thread docker-compose.yml
ryot-db:
image: postgres:18-alpine
restart: unless-stopped
container_name: ryot-dev-db
Comment thread README.md
## Quick Start

Create a `docker-compose.yml` file:
Use the `docker-compose.yml` file from the root of this repository:
Comment thread docker-compose.yml
POSTGRES_USER: postgres
POSTGRES_DB: postgres
volumes:
- postgres_storage:/var/lib/postgresql
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 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 `@docker-compose.yml`:
- Line 11: The volume mount currently maps the host volume to the parent path
/var/lib/postgresql; change the target to the actual PGDATA directory
/var/lib/postgresql/data so Postgres persists its database files across
recreates—update the postgres service volume mapping (the line that currently
reads the mapping to /var/lib/postgresql) to use /var/lib/postgresql/data as the
container path.
- Around line 22-24: Replace the committed secrets and inline DB credentials by
using environment variable substitution for SERVER_ADMIN_ACCESS_TOKEN and
DATABASE_URL (and FRONTEND_URL if intended to be configurable) instead of
hardcoded values; update the docker-compose service entries that currently
assign SERVER_ADMIN_ACCESS_TOKEN: mysecretkey and DATABASE_URL: postgres://...
to use ${SERVER_ADMIN_ACCESS_TOKEN} and ${DATABASE_URL} (or
${SERVER_ADMIN_ACCESS_TOKEN:?} / ${DATABASE_URL:?} to enforce presence), and add
a .env.example documenting these variables so users must provide real secrets
rather than copy-pasting defaults.

In `@README.md`:
- Around line 42-72: The README's Quick Start currently duplicates the root
docker-compose.yml contents; replace the inline YAML block with a concise
instruction that tells users to run the docker-compose command (e.g., "Use the
root docker-compose.yml: docker compose -f <path> up") and add a relative link
to the repository's docker-compose.yml file; update the Quick Start section text
to reference "docker-compose.yml" and the link instead of embedding the YAML so
the docs no longer drift from the source config.
🪄 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: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: bdd58e3d-80eb-4068-a840-546e64e9ee9d

📥 Commits

Reviewing files that changed from the base of the PR and between 009b654 and 24b2504.

📒 Files selected for processing (3)
  • README.md
  • apps/docs/src/index.md
  • docker-compose.yml

Comment thread docker-compose.yml
POSTGRES_USER: postgres
POSTGRES_DB: postgres
volumes:
- postgres_storage:/var/lib/postgresql
Copy link
Copy Markdown
Contributor

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

Mount the PostgreSQL data directory, not its parent path.

Line 11 should target /var/lib/postgresql/data to reliably persist the actual PGDATA directory across container recreations.

Proposed fix
-      - postgres_storage:/var/lib/postgresql
+      - postgres_storage:/var/lib/postgresql/data
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- postgres_storage:/var/lib/postgresql
- postgres_storage:/var/lib/postgresql/data
🤖 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 `@docker-compose.yml` at line 11, The volume mount currently maps the host
volume to the parent path /var/lib/postgresql; change the target to the actual
PGDATA directory /var/lib/postgresql/data so Postgres persists its database
files across recreates—update the postgres service volume mapping (the line that
currently reads the mapping to /var/lib/postgresql) to use
/var/lib/postgresql/data as the container path.

Comment thread docker-compose.yml
Comment on lines +22 to +24
SERVER_ADMIN_ACCESS_TOKEN: mysecretkey
DATABASE_URL: postgres://postgres:postgres@ryot-dev-db:5432/postgres
FRONTEND_URL: http://localhost:3001
Copy link
Copy Markdown
Contributor

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

Avoid committed default secrets and inline DB credentials in Compose defaults.

Committing SERVER_ADMIN_ACCESS_TOKEN: mysecretkey and embedding DB creds in DATABASE_URL creates an insecure copy-paste baseline. Use env substitution with required vars (or .env.example) so users must set real secrets.

Proposed fix
     environment:
-      SERVER_ADMIN_ACCESS_TOKEN: mysecretkey
-      DATABASE_URL: postgres://postgres:postgres@ryot-dev-db:5432/postgres
+      SERVER_ADMIN_ACCESS_TOKEN: ${SERVER_ADMIN_ACCESS_TOKEN:?set_in_.env}
+      DATABASE_URL: postgres://${POSTGRES_USER:?set}:${POSTGRES_PASSWORD:?set}`@ryot-dev-db`:5432/${POSTGRES_DB:-postgres}
       FRONTEND_URL: http://localhost:3001
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
SERVER_ADMIN_ACCESS_TOKEN: mysecretkey
DATABASE_URL: postgres://postgres:postgres@ryot-dev-db:5432/postgres
FRONTEND_URL: http://localhost:3001
environment:
SERVER_ADMIN_ACCESS_TOKEN: ${SERVER_ADMIN_ACCESS_TOKEN:?set_in_.env}
DATABASE_URL: postgres://${POSTGRES_USER:?set}:${POSTGRES_PASSWORD:?set}`@ryot-dev-db`:5432/${POSTGRES_DB:-postgres}
FRONTEND_URL: http://localhost:3001
🧰 Tools
🪛 Checkov (3.2.529)

[medium] 23-24: Basic Auth Credentials

(CKV_SECRET_4)

🤖 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 `@docker-compose.yml` around lines 22 - 24, Replace the committed secrets and
inline DB credentials by using environment variable substitution for
SERVER_ADMIN_ACCESS_TOKEN and DATABASE_URL (and FRONTEND_URL if intended to be
configurable) instead of hardcoded values; update the docker-compose service
entries that currently assign SERVER_ADMIN_ACCESS_TOKEN: mysecretkey and
DATABASE_URL: postgres://... to use ${SERVER_ADMIN_ACCESS_TOKEN} and
${DATABASE_URL} (or ${SERVER_ADMIN_ACCESS_TOKEN:?} / ${DATABASE_URL:?} to
enforce presence), and add a .env.example documenting these variables so users
must provide real secrets rather than copy-pasting defaults.

Comment thread README.md
Comment on lines +42 to 72
Use the `docker-compose.yml` file from the root of this repository:

```yaml
services:
ryot-db:
restart: unless-stopped
image: postgres:18-alpine
restart: unless-stopped
container_name: ryot-dev-db
environment:
- POSTGRES_PASSWORD=postgres
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: postgres
volumes:
- postgres_storage:/var/lib/postgresql

ryot:
image: ignisda/ryot:v10
restart: unless-stopped
container_name: ryot
depends_on:
- ryot-db
ports:
- "8000:8000"
- "3001:8000"
environment:
- SERVER_ADMIN_ACCESS_TOKEN=CHANGE_ME_TO_A_LONG_RANDOM_STRING
- DATABASE_URL=postgres://postgres:postgres@ryot-db:5432/postgres
SERVER_ADMIN_ACCESS_TOKEN: mysecretkey
DATABASE_URL: postgres://postgres:postgres@ryot-dev-db:5432/postgres
FRONTEND_URL: http://localhost:3001

volumes:
postgres_storage:
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial | ⚡ Quick win

Quick Start duplicates the root Compose config and can drift.

Since this section already instructs users to use the root docker-compose.yml, consider replacing the inline YAML with a short command + link to the file path to keep docs and runtime config in lockstep.

🤖 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 `@README.md` around lines 42 - 72, The README's Quick Start currently
duplicates the root docker-compose.yml contents; replace the inline YAML block
with a concise instruction that tells users to run the docker-compose command
(e.g., "Use the root docker-compose.yml: docker compose -f <path> up") and add a
relative link to the repository's docker-compose.yml file; update the Quick
Start section text to reference "docker-compose.yml" and the link instead of
embedding the YAML so the docs no longer drift from the source config.

@IgnisDa
Copy link
Copy Markdown
Owner

IgnisDa commented May 28, 2026

Why are these changes needed?

@IgnisDa
Copy link
Copy Markdown
Owner

IgnisDa commented May 29, 2026

Went through the PR again. I don't see any reason for these changes. I will close this PR. Feel free to ping me here if you have any reasons for this PR to be merged.

@IgnisDa IgnisDa closed this May 29, 2026
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.

4 participants