From 88c63ad6c87c7ead4250f4ca866b70b0ca952482 Mon Sep 17 00:00:00 2001 From: olcortesb Date: Thu, 21 May 2026 15:26:05 +0200 Subject: [PATCH 1/2] feat: add postgres docker compose configuration template --- docker-compose.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..04fd9911 --- /dev/null +++ b/docker-compose.yml @@ -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: From 2e38b6c63255802dc2c295cb923fb4f448101bc6 Mon Sep 17 00:00:00 2001 From: olcortesb Date: Thu, 21 May 2026 15:54:29 +0200 Subject: [PATCH 2/2] docs: add docker base postgreSQL setup alternative --- docs/local-postgres-setup.md | 51 ++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/docs/local-postgres-setup.md b/docs/local-postgres-setup.md index 66ba7a98..2182356d 100755 --- a/docs/local-postgres-setup.md +++ b/docs/local-postgres-setup.md @@ -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.