-
-
Notifications
You must be signed in to change notification settings - Fork 0
[feature] Launch CLI using the api-runner service #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe changes introduce a new Makefile target, Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Makefile
participant DockerCompose
participant ApiRunnerContainer
User->>Makefile: make run-cli
Makefile->>Makefile: Check DB_SECRET_* env vars
alt If any secret missing
Makefile-->>User: Print usage & exit
else All secrets set
Makefile->>DockerCompose: docker compose run api-runner go run cli/main.go
DockerCompose->>ApiRunnerContainer: Start with .env and DB env vars
ApiRunnerContainer-->>User: CLI runs with provided secrets
end
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
Makefile(1 hunks)config/makefile/app.mk(2 hunks)docker-compose.yml(1 hunks)
🔇 Additional comments (6)
config/makefile/app.mk (3)
1-1: LGTM: Proper PHONY target declaration.The addition of
run-clito the.PHONYtarget list is correct and follows Makefile best practices.
43-46: Consider security implications of displaying secret paths.While displaying the paths to secret files is generally acceptable for debugging purposes, ensure that the actual secret values are never accidentally exposed in logs or console output.
The current implementation shows file paths which should be safe, but verify that the Docker Compose execution doesn't expose actual secret values in any logs.
47-50: LGTM: Proper Docker Compose execution with environment variables.The Docker Compose command correctly passes the environment variables and executes the CLI within the
api-runnerservice. The--rmflag ensures proper cleanup after execution.docker-compose.yml (2)
83-83: LGTM: Secure .env file mounting.The
.envfile is properly mounted as read-only (:roflag), which is a good security practice that prevents the container from modifying the host's environment file.
86-88: LGTM: Proper environment variable configuration.The database connection environment variables are correctly set:
ENV_DB_HOSTpoints to theapi-dbserviceENV_DB_PORTuses the environment variable with a sensible default fallbackThis configuration aligns well with the existing database service setup.
Makefile (1)
55-56: LGTM: Clear and consistent help text addition.The help text entry for
run-clifollows the established formatting pattern and provides a clear description of the command's purpose. The placement in the "General Commands" section is appropriate.
Summary by CodeRabbit
New Features
Chores
.envfile and set database host and port environment variables for the API runner service.