cd# BuildBoard Backend
This guide explains how to set up the database and application locally.
- Docker & Docker Compose
- Python 3.11+
We use a docker-compose.yml file strictly for local development. It spins up a PostgreSQL database so you don't have to install one manually.
Start the database:
docker compose up -dThis starts a Postgres container on port 5432 with the following credentials:
- User:
user - Password:
password - Database:
buildboard
You need a .env file to tell the application how to connect to this local database.
-
Copy the example configuration:
cp .env.example .env
-
Verify your
.envfile. For local development, it MUST contain this exact connection string:DATABASE_URL=postgresql://user:password@127.0.0.1:5432/buildboardIf you are running the app inside Docker as well (not just the DB), you might need to use
host.docker.internalinstead oflocalhost.
Create and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate1eb76e0 (feat: Add all features (handle system, GitHub integration, analytics, migrations, cleanup pycache)) Install dependencies:
pip install -r requirements.txtStart the server (with hot-reload):
uvicorn app.main:app --reloadThe app will automatically migrate the database schema upon startup.
There is a strict separation between local dev and production:
- Local: Uses
docker-compose.ymlto run a throwaway Postgres container. You control the variables via.env. - Production (Coolify):
- Uses the
Dockerfileto build the application image. - The Database is managed by Coolify (or an external provider).
- Environment variables (like
DATABASE_URL) are injected by Coolify's dashboard, NOT from the.envfile. - Do NOT use the
docker-compose.ymlfor production deployment.
- Uses the