docs: expand Deployment guide (GitHub SSH, clone path, pg_restore, CppAlliance)#203
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughDocumentation-only updates to docs/Deployment.md revising GitHub environment secret wording, adding server SSH key instructions, expanding .env and Celery schedule creation/permissions, adding manual repository-init steps, refining PostgreSQL role text, expanding backup/restore options, and updating Docker/CI and nginx examples. ChangesDeployment Guide Updates
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
docs/Deployment.md (1)
188-191: ⚡ Quick winAvoid
$USERin ownership commands for deploy docs.Using
$USERwithsudocan resolve unexpectedly (for example, root shells), causing wrong ownership. Prefer the explicit deploy user placeholder (gcp-cppalliance) or an explicit<SSH_USER>placeholder consistently.🤖 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 `@docs/Deployment.md` around lines 188 - 191, Replace the unsafe use of "$USER" in the ownership command: instead of sudo chown -R "$USER:$USER" /opt/boost-data-collector, use an explicit deploy user placeholder (e.g., <SSH_USER>) or the concrete deploy account (e.g., gcp-cppalliance) so ownership is deterministic; update the documentation text around the mkdir/chown sequence (the lines containing sudo mkdir -p /opt/boost-data-collector and sudo chown -R "$USER:$USER" /opt/boost-data-collector) to show sudo chown -R <SSH_USER>:<SSH_USER> /opt/boost-data-collector (or gcp-cppalliance:gcp-cppalliance) and ensure any surrounding instructions reference the same placeholder.
🤖 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 `@docs/Deployment.md`:
- Line 270: Replace the sentence that suggests placing dumps in /tmp with
world-readable permissions; instruct readers to use least-privilege permissions
and ownership instead: require the file be owned by the restoring account (e.g.,
the postgres OS user or the current login used for bdc/127.0.0.1) and set
restrictive mode like 600 (not 644), or store the dump in a secure directory or
stream it to pg_restore via stdin to avoid exposing sensitive backup contents.
Ensure references to pg_restore, /tmp/, 644, postgres, bdc and 127.0.0.1 in the
paragraph are updated accordingly.
- Around line 104-116: The copy/edit commands in Step 2 assume the current
working directory; prefix them by changing into the deployment directory first
to avoid failures—add an explicit cd to /opt/boost-data-collector at the start
of Step 2 so the subsequent cp .env.example .env and cp
config/boost_collector_schedule.yaml.example
config/boost_collector_schedule.yaml commands run from the correct repository
root.
---
Nitpick comments:
In `@docs/Deployment.md`:
- Around line 188-191: Replace the unsafe use of "$USER" in the ownership
command: instead of sudo chown -R "$USER:$USER" /opt/boost-data-collector, use
an explicit deploy user placeholder (e.g., <SSH_USER>) or the concrete deploy
account (e.g., gcp-cppalliance) so ownership is deterministic; update the
documentation text around the mkdir/chown sequence (the lines containing sudo
mkdir -p /opt/boost-data-collector and sudo chown -R "$USER:$USER"
/opt/boost-data-collector) to show sudo chown -R <SSH_USER>:<SSH_USER>
/opt/boost-data-collector (or gcp-cppalliance:gcp-cppalliance) and ensure any
surrounding instructions reference the same placeholder.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
…rets, SSH user configuration, and backup procedures
Summary
git@github.com(separate from the GitHub Actions deploy key) and optional manual clone into/opt/boost-data-collector.boost_collector_schedule.yamlfrom the example alongside.envsetup.gcp-cppalliance).pg_restoreasbdcover127.0.0.1, clarify dump file readability and post-restore grants for postgres vsbdcrestores..env” to Step 2 for ownership; point Docker stack at deploy-script behavior for CI’smakesequence.Closes #186
The dev server is running on
staging.insights.cppalliance.org.Summary by CodeRabbit