-
-
Notifications
You must be signed in to change notification settings - Fork 49
feat: dockerized development setup with live reloading #441
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
feat: dockerized development setup with live reloading #441
Conversation
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughIntroduces a development workflow: adds an API dev Dockerfile and a dev docker-compose stack, extends the CLI installer with a development subcommand and control-flow paths, updates dev configuration defaults, removes a view dependency, and refreshes the API version timestamp. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant U as User
participant CLI as nixopus CLI
participant I as Install (development=True)
participant DC as docker-compose (dev)
participant API as API Service
participant V as Frontend Dev Server
participant DB as Postgres
participant R as Redis
participant ST as Supertokens
participant C as Caddy
U->>CLI: nixopus install development [options]
CLI->>I: Construct Install(development=True, dev_install_path)
I->>I: _get_config(dev) and log setup
I->>I: _check_and_install_dependencies_dev()
alt --force
I->>I: _cleanup_docker()
end
I->>DC: up -d (api, db, redis, supertokens, caddy)
DC-->>DB: start + healthcheck
DC-->>R: start + healthcheck
DC-->>ST: start + healthcheck
DC-->>API: build from Dockerfile.dev + healthcheck
DC-->>C: start + healthcheck
I->>I: _start_frontend() (yarn install && dev)
I->>I: _validate_services() (HTTP readiness)
I-->>CLI: success details (ports, logs, commands)
CLI-->>U: Output summary
note over I,DC: Proxy setup skipped in dev
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
… feat/dev-setup-stokns # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
… feat/dev-setup-stokns
@coderabbitai: Add detailed summary and detailed review |
🧩 Analysis chain🏁 Script executed:
Length of output: 90435 @zhravan: I'll provide a detailed summary and review of this PR. Detailed SummaryThis PR introduces a comprehensive dockerized development environment with live reloading capabilities for the Nixopus project. The changes separate development and production deployment modes, enabling developers to run the entire stack locally with hot-reload functionality. Key Changes:1. New Development Dockerfile (
|
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.
Hey @zhravan here are some details to take care, rest LGTM!
view_domain=view_domain, | ||
repo=repo, | ||
branch=branch, | ||
development=False, |
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.
if Install
and DevelopmentInstall
are two seperate methods then why are we passing development=False
here?
self._cache = {} | ||
|
||
# Determine config file based on environment | ||
config_file = "config.dev.yaml" if default_env.upper() == "DEVELOPMENT" else "config.prod.yaml" |
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.
should we also have a over ride yaml right here? like if we set a CUSTOM_YAML='/some/path'
then it should override these behaviours by default.
not related to this PR, but good to go as you are aware of the flow here,
SSH_PORT: ${SSH_PORT:-22} | ||
SSH_USER: ${SSH_USER:-$USER} | ||
SSH_PRIVATE_KEY: ${SSH_PRIVATE_KEY:-~/.ssh/id_rsa_nixopus} | ||
SSH_PRIVATE_KEY: ${SSH_PRIVATE_KEY:-/root/.ssh/id_rsa_nixopus} |
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.
why root instead of HOME
directory?
"lucide-react": "^0.479.0", | ||
"next": "15.2.3", | ||
"next-themes": "^0.4.4", | ||
"nextjs-cors": "^2.2.0", |
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.
should we revert this change? and keep it in a seperate pr?
supertokens: | ||
|
||
nixopus-supertokens: |
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.
let's avoid this change for now, and see if this is affecting in production,
have you tested this change?
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.
What happens if some containers are running and some fails out? are we handling proper cleanup ensure so that user does not have to come in a state where he does not what happened, and not sure how to resolve in a half broken state?
Description:
This PR introduces a comprehensive dockerized development environment with live reloading capabilities for the Nixopus project. The changes separate development and production deployment modes, enabling developers to run the entire stack locally with hot-reload functionality.
Summary by CodeRabbit
New Features
Chores