init commit to create the project
This commit is contained in:
commit
6a97bbe6ae
5
.env.example
Normal file
5
.env.example
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# homelab-postgres environment.
|
||||||
|
#
|
||||||
|
# Same password that initialized the existing `ob1_data` volume — DO NOT
|
||||||
|
# rotate without also re-initializing the volume (which would destroy data).
|
||||||
|
POSTGRES_PASSWORD=CHANGEME
|
||||||
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
.env
|
||||||
|
*.env.local
|
||||||
50
compose.yml
Normal file
50
compose.yml
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
# homelab-postgres — shared Postgres + pgvector for the homelab.
|
||||||
|
#
|
||||||
|
# Houses three databases on a single instance: `openbrain` (OB1 MCP),
|
||||||
|
# `trellis` (trellis-mcp), `herbylab` (herby-dev artifact store). Volume
|
||||||
|
# `ob1_data` is the live data store — declared external so this compose
|
||||||
|
# project cannot accidentally destroy it on `down`.
|
||||||
|
#
|
||||||
|
# History: this was previously `ob1-postgres` co-located inside the
|
||||||
|
# OB1 deploy stack. Renamed and extracted on 2026-05-14. No
|
||||||
|
# back-compat alias — consumer .env files were updated to point at
|
||||||
|
# `homelab-postgres:5432`.
|
||||||
|
#
|
||||||
|
# Usage:
|
||||||
|
# docker compose -f compose.yml up -d
|
||||||
|
#
|
||||||
|
# Env: reads .env (POSTGRES_PASSWORD). .env is gitignored.
|
||||||
|
|
||||||
|
name: postgres
|
||||||
|
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: pgvector/pgvector:pg17
|
||||||
|
container_name: homelab-postgres
|
||||||
|
restart: unless-stopped
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
environment:
|
||||||
|
POSTGRES_DB: openbrain
|
||||||
|
POSTGRES_USER: postgres
|
||||||
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||||
|
volumes:
|
||||||
|
- ob1_data:/var/lib/postgresql/data
|
||||||
|
ports:
|
||||||
|
- "127.0.0.1:5433:5432" # loopback only — consumers reach via in-network hostname
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "pg_isready -U postgres -d openbrain"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
networks:
|
||||||
|
- homelab
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
ob1_data:
|
||||||
|
external: true
|
||||||
|
name: ob1_data
|
||||||
|
|
||||||
|
networks:
|
||||||
|
homelab:
|
||||||
|
external: true
|
||||||
Loading…
Reference in New Issue
Block a user