Fix prod-run.sh path logic for node_modules, logrotate, and systemd templates - #47
Conversation
|
CodeAnt AI is reviewing your PR. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
📝 WalkthroughWalkthroughThis change refactors the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
Nitpicks 🔍
|
|
CodeAnt AI finished reviewing your PR. |
User description
Motivation
PROJECT_DIRandLOG_DIRused at runtime.Description
fix_node_modules: only install whennode_modulesis missing and usenpm ci --omit=devifpackage-lock.jsonexists or fall back tonpm install --omit=devotherwise.ensure_logrotate_configto generate a template that uses$LOG_DIRinstead of/var/www/html/Runewagerand add logic to replace an existing/etc/logrotate.d/runewagerwhen it doesn't reference the detected$LOG_DIR.ensure_systemd_serviceto emit a unit that uses$PROJECT_DIRand$LOG_DIRforWorkingDirectory,ExecStart,EnvironmentFile, andStandardOutput, and expand required-directive checks so stale hard-coded units get corrected.systemctl daemon-reload) so automated checks still run after fixes.Testing
bash -n prod-run.sh; syntax validation passed.git diff -- prod-run.shand committed the patch; commit message:Fix prod-run path handling for deps, logrotate, and systemd.logrotatedry-run andsystemctl daemon-reloadcalls for runtime validation (no failures introduced by edits).Codex Task
Summary by CodeRabbit
Bug Fixes
Chores
CodeAnt-AI Description
Fix prod-run behavior: avoid redundant npm reinstalls and make logrotate/systemd use actual project and log directories
What Changed
Impact
✅ Fewer unnecessary dependency reinstalls✅ Correct log rotation for actual log location✅ Systemd service runs with correct project and log paths💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.