-
Notifications
You must be signed in to change notification settings - Fork 5
refactor:control-panel #469
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
Open
sosweetham
wants to merge
9
commits into
main
Choose a base branch
from
refactor/control-panel-infrastructure
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
e04ae8b
fix: local dev qol
sosweetham e7c68b0
fix: env example
sosweetham 9f56234
fix: eid wallet check
sosweetham b7fd8fc
refactor:control-panel
sosweetham a3c0e12
Merge branch 'fix/local-dev-qol' into refactor/control-panel-infrastr…
sosweetham c9362ae
refactor: make monitoring functioning again
sosweetham ad0e3c3
fix: make eVault details visible
sosweetham d24c4cf
feat: add loki env vars to example env
sosweetham 74da3f3
fix: ename normalization logic
sosweetham File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Empty file.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| #!/bin/bash | ||
| set -e | ||
|
|
||
| # Get the list of databases from environment variable | ||
| # Default to empty if not set | ||
| POSTGRES_MULTIPLE_DATABASES=${POSTGRES_MULTIPLE_DATABASES:-} | ||
|
|
||
| # If no databases specified, exit | ||
| if [ -z "$POSTGRES_MULTIPLE_DATABASES" ]; then | ||
| echo "No databases specified in POSTGRES_MULTIPLE_DATABASES" | ||
| exit 0 | ||
| fi | ||
|
|
||
| echo "Creating multiple databases..." | ||
|
|
||
| # Split the comma-separated list and create each database | ||
| IFS=',' read -ra DATABASES <<< "$POSTGRES_MULTIPLE_DATABASES" | ||
| for db in "${DATABASES[@]}"; do | ||
| # Trim whitespace | ||
| db=$(echo "$db" | xargs) | ||
|
|
||
| if [ -n "$db" ]; then | ||
| # Check if database exists | ||
| DB_EXISTS=$(psql -v ON_ERROR_STOP=0 --username "$POSTGRES_USER" --dbname postgres -tAc "SELECT 1 FROM pg_database WHERE datname='$db'" 2>/dev/null || echo "") | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| if [ "$DB_EXISTS" = "1" ]; then | ||
| echo "Database $db already exists, skipping..." | ||
| else | ||
| echo "Creating database: $db" | ||
| # Create the database directly (not inside a function) | ||
| psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname postgres <<-EOSQL | ||
| CREATE DATABASE "$db"; | ||
| EOSQL | ||
| fi | ||
| fi | ||
| done | ||
|
|
||
| echo "Multiple databases created successfully!" | ||
|
|
||
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
🧩 Analysis chain
🏁 Script executed:
Repository: MetaState-Prototype-Project/prototype
Length of output: 311
🏁 Script executed:
Repository: MetaState-Prototype-Project/prototype
Length of output: 251
🏁 Script executed:
Repository: MetaState-Prototype-Project/prototype
Length of output: 154
🏁 Script executed:
Repository: MetaState-Prototype-Project/prototype
Length of output: 277
🏁 Script executed:
Repository: MetaState-Prototype-Project/prototype
Length of output: 1387
🏁 Script executed:
Repository: MetaState-Prototype-Project/prototype
Length of output: 443
🏁 Script executed:
Repository: MetaState-Prototype-Project/prototype
Length of output: 341
🏁 Script executed:
Repository: MetaState-Prototype-Project/prototype
Length of output: 614
🏁 Script executed:
Repository: MetaState-Prototype-Project/prototype
Length of output: 740
🏁 Script executed:
Repository: MetaState-Prototype-Project/prototype
Length of output: 1012
🏁 Script executed:
Repository: MetaState-Prototype-Project/prototype
Length of output: 4124
Remove duplicate Loki environment variables from
.env.example.Lines 77–83 contain duplicate
LOKI_URL,LOKI_USERNAME, andLOKI_PASSWORDkeys. The second set (lines 81–83) will overwrite the first during dotenv parsing, causing the production IP address (146.190.29.56) to be used instead of the localhost development configuration. Additionally,.env.exampleshould contain a single canonical set of example values, not multiple configurations.Apply this diff to keep only the development configuration:
Alternatively, if production configuration reference is needed:
📝 Committable suggestion
🧰 Tools
🪛 dotenv-linter (4.0.0)
[warning] 79-79: [UnorderedKey] The LOKI_PASSWORD key should go before the LOKI_URL key
(UnorderedKey)
[warning] 81-81: [DuplicatedKey] The LOKI_URL key is duplicated
(DuplicatedKey)
[warning] 82-82: [DuplicatedKey] The LOKI_USERNAME key is duplicated
(DuplicatedKey)
[warning] 83-83: [DuplicatedKey] The LOKI_PASSWORD key is duplicated
(DuplicatedKey)
[warning] 83-83: [UnorderedKey] The LOKI_PASSWORD key should go before the LOKI_URL key
(UnorderedKey)
🤖 Prompt for AI Agents