feat: restructure PostgreSQL setup with base variant

This commit is contained in:
2026-03-08 18:11:18 +07:00
parent a3610d6756
commit d490100860
6 changed files with 52 additions and 70 deletions

View File

@@ -1,4 +0,0 @@
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_DB=postgres
POSTGRES_PORT=5432

View File

@@ -1,3 +0,0 @@
CREATE EXTENSION IF NOT EXISTS citext;
CREATE EXTENSION IF NOT EXISTS pg_trgm;
CREATE EXTENSION IF NOT EXISTS pgcrypto;

View File

@@ -1,6 +0,0 @@
FROM postgres:18-alpine
COPY 000_extensions.sql /docker-entrypoint-initdb.d/
HEALTHCHECK --interval=10s --timeout=5s --retries=5 \
CMD pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}

View File

@@ -1,16 +0,0 @@
services:
postgres:
# run `just build postgres` first
image: db-postgres:latest
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
POSTGRES_DB: ${POSTGRES_DB:-postgres}
ports:
- "${POSTGRES_PORT:-5432}:5432"
volumes:
- postgres-data:/var/lib/postgresql
volumes:
postgres-data: