Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 8
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
e04ae8be7c68b09f56234b7fd8fca3c0e12c9362aead0e3c3d24c4cf74da3f33304cd0a2fd6e4File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| 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.
Uh oh!There was an error while loading. Please reload this page. | ||
| 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!" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -126,6 +126,19 @@ services: | ||
| networks: | ||
| - metastate-network | ||
| <<: *common-host-access | ||
| entrypoint: ["/bin/sh", "-c"] | ||
| command: | ||
| - | | ||
| # Remove any stale PID files before starting Neo4j | ||
| # Neo4j stores PID files in /var/lib/neo4j/run/neo4j.pid | ||
| rm -f /var/lib/neo4j/run/neo4j.pid 2>/dev/null || true | ||
| rm -f /var/lib/neo4j/data/run/neo4j.pid 2>/dev/null || true | ||
| rm -f /var/lib/neo4j/data/neo4j.pid 2>/dev/null || true | ||
| # Also clean up any other PID files | ||
| find /var/lib/neo4j -name "*.pid" -type f -delete 2>/dev/null || true | ||
| find /var/lib/neo4j/data -name "*.pid" -type f -delete 2>/dev/null || true | ||
| # Start Neo4j with the original entrypoint | ||
| exec /startup/docker-entrypoint.sh neo4j | ||
| healthcheck: | ||
| test: [ "CMD-SHELL", "cypher-shell -u neo4j -p ${NEO4J_PASSWORD:-neo4j} 'RETURN 1' || exit 1" ] | ||
| interval: 10s | ||
| @@ -557,6 +570,18 @@ services: | ||
| - metastate-network | ||
| <<: *common-host-access | ||
| # Loki for log aggregation | ||
| loki: | ||
| profiles: | ||
| - all | ||
| image: grafana/loki:latest | ||
| ports: | ||
| - "3100:3100" | ||
| command: -config.file=/etc/loki/local-config.yaml | ||
| networks: | ||
| - metastate-network | ||
| <<: *common-host-access | ||
sosweetham marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| volumes: | ||
| postgres_data: | ||
| neo4j_data: | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
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