Skip to content

Conversation

arkagrawall
Copy link

@arkagrawall arkagrawall commented Aug 15, 2025

This PR introduces a minimal docker-compose.yml for local Postgres 15 and updates the Quick Start docs to prefer docker compose over a one-off docker run.


✅ What’s included

  • New docker-compose.yml with a db service:
    • Postgres 15
    • Dev-friendly credentials
    • Persistent named volume
    • Healthcheck for service readiness
  • README.md updates:
    • Option A (Docker Compose, recommended)
    • Option B (one-off container, original method preserved)
    • Notes for stopping and cleaning up the database

💡 Why

  • Simplifies onboarding for contributors — one command to start Postgres
  • Keeps backwards compatibility (existing docker run instructions remain)
  • No changes to how the API, UI, or Verifier bot run locally
  • Connection strings and app startup remain the same

🛠 How to use

# Start Postgres
docker compose up -d db

# Apply migrations (unchanged)
cd UnsecuredAPIKeys.WebAPI
dotnet ef database update --project ../UnsecuredAPIKeys.Data --startup-project .

# Run apps (unchanged)

# API
cd UnsecuredAPIKeys.WebAPI && dotnet run

# UI
cd ../UnsecuredAPIKeys.UI && npm install && npm run dev

# Verifier Bot
cd ../UnsecuredAPIKeys.Bots.Verifier && dotnet run

Default endpoints:


📌 Notes

  • docker compose down will stop the database.
  • Use docker compose down -v if you also want to remove the persistent volume.

Closes #4

@arkagrawall arkagrawall changed the title feat(dev): add Docker Compose for Postgres and update Quick Start docs feat(dev): add Docker Compose for Postgres and update Quick Start docs (closes #4) Aug 15, 2025
@pavannitheesh
Copy link

when i run this command
-> dotnet ef database update --project ../UnsecuredAPIKeys.Data --startup-project .
i am getting a postgres password authentication problem.
how to solve this

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.

Update the environment to use docker postgres instead of the local installation of postgres

2 participants