chore: Add initial PostgreSQL configuration files and Docker setup

This commit is contained in:
2026-03-07 04:03:48 +07:00
commit 70a656caf6
3 changed files with 27 additions and 0 deletions

22
postgres/compose.yml Normal file
View File

@@ -0,0 +1,22 @@
services:
postgres:
build:
context: .
dockerfile: Dockerfile
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/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-postgres}"]
interval: 10s
timeout: 5s
retries: 5
volumes:
postgres_data: