Skip to content

feat: add setup.sh to bootstrap local development environment#706

Open
Xaxxoo wants to merge 1 commit into
SoroScan:mainfrom
Xaxxoo:feat/setup-script-381
Open

feat: add setup.sh to bootstrap local development environment#706
Xaxxoo wants to merge 1 commit into
SoroScan:mainfrom
Xaxxoo:feat/setup-script-381

Conversation

@Xaxxoo
Copy link
Copy Markdown

@Xaxxoo Xaxxoo commented Jun 1, 2026

Closes #381

Summary

  • Adds scripts/setup.sh — a single idempotent script that takes a fresh clone to a fully running local environment.
  • Checks for Docker, Docker Compose, and Python 3.11+ with actionable error messages when missing.
  • Copies django-backend/.env.exampledjango-backend/.env on first run (skips safely on re-runs).
  • Builds Docker images in parallel, starts db and redis, polls pg_isready, then runs Django migrations.
  • Prints a success banner with local endpoint URLs and useful follow-up commands.
  • Supports both docker-compose (v1) and docker compose (v2 plugin).

Test plan

  • Fresh clone: run ./scripts/setup.sh — all steps complete without error, .env created, migrations applied
  • Re-run: script completes again without errors, .env copy step is skipped with a warning
  • Missing Docker: script exits with a clear error message and install hint
  • Docker daemon not running: script detects it and exits with a clear message
  • Missing Python 3.11: script warns but continues (Python is optional for Docker-based setup)

Closes SoroScan#381

- Create scripts/setup.sh that automates first-time local setup:
  * Checks for Docker, Docker Compose, and Python 3.11+ with clear
    error messages and install hints when missing.
  * Verifies the Docker daemon is running before proceeding.
  * Copies django-backend/.env.example to django-backend/.env when no
    .env file exists yet (idempotent — skips copy on re-runs).
  * Builds all Docker images in parallel via docker compose build.
  * Starts db and redis, polls pg_isready until Postgres is healthy.
  * Applies Django migrations inside the web container.
  * Prints a success summary with local endpoint URLs and useful
    follow-up commands.
- Script is idempotent: running it a second time will skip .env copy
  and gracefully continue through the remaining steps.
- Supports both docker-compose (v1) and docker compose (v2 plugin).
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Jun 1, 2026

@Xaxxoo Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create highly-automated setup.sh to bootstrap local dev environment

1 participant