Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2026 ExtendDB contributors
# SPDX-License-Identifier: Apache-2.0
# extenddb postgres docker-compose configuration
services:
postgres:
image: postgres:15
environment:
POSTGRES_PASSWORD: extenddb-local-dev
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 3s
retries: 5

volumes:
pgdata:
51 changes: 51 additions & 0 deletions docs/local-postgres-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,57 @@ export EXTENDDB__STORAGE__POSTGRES__CONNECTION_STRING=\

---

## Docker Setup (Alternative)

A `docker-compose.yml` is provided at the repository root for a quick PostgreSQL setup with no manual installation.

### Prerequisites

- Docker Engine 20.10+ with Compose plugin (`docker compose`)

### Start PostgreSQL

```bash
docker compose up -d
```

Wait for the container to be healthy:

```bash
docker compose ps
```

### Connection Details

| Setting | Value |
|---------|-------|
| Host | `localhost` |
| Port | `5432` |
| Admin user | `postgres` |
| Admin password | `extenddb-local-dev` |

### Initialize ExtendDB

Since the Docker container uses `postgres` as the superuser, pass it explicitly to `init`:

```bash
./target/release/extenddb init --config extenddb.toml \
--pg-user postgres \
--pg-pass extenddb-local-dev
```

### Stop and Clean Up

```bash
# Stop (preserves data)
docker compose down

# Stop and delete all data
docker compose down -v
```

---

## License

Copyright 2026 ExtendDB contributors. Licensed under the Apache License, Version 2.0.
Expand Down