Files
explorer-monorepo/scripts
Devin 78e1ff5dc8 fix(scripts): require DB_PASSWORD env var in setup-database.sh
PR #3 scrubbed ***REDACTED-LEGACY-PW*** from every env file, compose unit, and
deployment doc but missed scripts/setup-database.sh, which still hard-
coded DB_PASSWORD="***REDACTED-LEGACY-PW***" on line 17. That slipped past
gitleaks because the shell-escaped form (backslash-dollar) does not
match the L@kers?\$?2010 regex committed in .gitleaks.toml -- the
regex was written to catch the *expanded* form, not the source form.

This commit removes the hardcoded default and requires DB_PASSWORD to
be exported by the operator before running the script. Same pattern as
the rest of the PR #3 conversion (fail-fast at boot when a required
secret is unset) so there is no longer any legitimate reason for the
password string to live in the repo.

Verification:
  git grep -nE 'L@kers?\\?\$?2010' -- scripts/    # no matches
  bash -n scripts/setup-database.sh                   # clean
2026-04-18 20:01:46 +00:00
..

Scripts

Development and deployment scripts for the ChainID 138 Explorer Platform.

Available Scripts

setup.sh

Initial setup script that:

  • Creates .env file from .env.example
  • Installs backend dependencies (Go modules)
  • Installs frontend dependencies (npm)
  • Starts infrastructure services (PostgreSQL, Elasticsearch, Redis)
  • Runs database migrations

Usage:

./scripts/setup.sh

check-requirements.sh

Checks if all required tools are installed:

  • Go 1.21+
  • Node.js 20+
  • Docker
  • Docker Compose

Usage:

./scripts/check-requirements.sh

run-dev.sh

Starts all services in development mode:

  • Infrastructure services (PostgreSQL, Elasticsearch, Redis)
  • Database migrations
  • Indexer service
  • API server
  • Frontend development server

Usage:

./scripts/run-dev.sh

Note: Press Ctrl+C to stop all services.

deploy.sh

Production deployment script (to be configured).

test.sh

Run tests (to be configured).

Troubleshooting

Script not found

Make sure you're running scripts from the project root directory:

cd explorer-monorepo
./scripts/run-dev.sh

Permission denied

Make scripts executable:

chmod +x scripts/*.sh

Script fails with path errors

The scripts automatically detect the project root, but if you encounter issues, make sure you're in the explorer-monorepo directory when running them.