refactor: moved to folder {{db}/{{variant}} instead of {{db}}-{{variant}}/

This commit is contained in:
2026-03-09 04:11:51 +07:00
parent 4b783457d0
commit dc527779e8
4 changed files with 2 additions and 2 deletions

View File

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

View File

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

6
postgres/base/Dockerfile Normal file
View File

@@ -0,0 +1,6 @@
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}

16
postgres/base/compose.yml Normal file
View File

@@ -0,0 +1,16 @@
services:
postgres:
# run `just build postgres` first
image: db-postgres:base
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-base-data:/var/lib/postgresql
volumes:
postgres-base-data: