-
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 8 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
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 "") | ||
|
|
||
| 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.
Uh oh!
There was an error while loading. Please reload this page.