| # Compose used for local development: spins up a Postgres database | |
| # Run the server locally alongside it with `python -m server` (uncomment LEAN_SERVER_DATABASE_URL in .env) | |
| services: | |
| postgres: | |
| image: postgres:17-alpine | |
| container_name: postgres | |
| volumes: | |
| - ./.data:/var/lib/postgresql/data | |
| environment: | |
| - POSTGRES_USER=root | |
| - POSTGRES_PASSWORD=root | |
| - POSTGRES_DB=leanserver | |
| ports: | |
| - "5432:5432" | |
| healthcheck: | |
| test: ["CMD-SHELL", "pg_isready -U root -d leanserver"] | |
| interval: 10s | |
| retries: 5 | |