Update settings for running poseidon#117
Closed
uzairali19 wants to merge 1 commit intoposeidon/devfrom
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces environment-based configuration management and dynamic port allocation to the Poseidon project. The most important changes include adding an
.envfile for environment variables, refactoring the configuration to load sensitive data from the.envfile, and implementing a utility to dynamically allocate free ports for the frontend and backend.Environment-based configuration:
mindtrace/ui/mindtrace/ui/poseidon/.env.example: Added a sample.envfile with placeholders for environment variables such asMONGO_URI,DB_NAME,SECRET_KEY,GCP_BUCKET_NAME, andGCP_CREDENTIALS_PATH.mindtrace/ui/mindtrace/ui/poseidon/.gitignore: Updated.gitignoreto exclude the.envfile from being tracked in version control.Refactoring configuration:
mindtrace/ui/mindtrace/ui/poseidon/poseidon/backend/core/config.py: Refactored theSettingsclass to load sensitive data (e.g., database URI, secret key, GCP credentials) from the.envfile using Pydantic's environment variable support.Dynamic port allocation:
mindtrace/ui/mindtrace/ui/poseidon/rxconfig.py: Added a utility functionfind_free_portto dynamically allocate free ports for the frontend and backend. Integrated this functionality by settingfrontend_portandbackend_portusing environment variables or the utility function.mindtrace/ui/mindtrace/ui/poseidon/rxconfig.py: Updated thePoseidonConfigclass to includefrontend_portandbackend_portin the configuration.