feat(postgres): add PostgreSQL 18 Alpine compose file

- Add docker-compose.yaml with POSTGRES_USER, POSTGRES_PASSWORD, and
  POSTGRES_DB environment variables
- Add .env.example with documented defaults
- Remove Contents section from README
This commit is contained in:
siujamo committed 2026-07-30 14:10:49 +08:00
1 parent 2eca68c209
commit f5546b23ba
3 files changed
+46 -7

No files matched your search

-7
View File
@@ -3,13 +3,6 @@
A collection of Docker infrastructure files for quick deployment of A collection of Docker infrastructure files for quick deployment of
development services. development services.
## Contents
- **`compose/`** — Docker Compose files for various services
- [`sql-server-2025`](compose/sql-server-2025/) — Microsoft SQL Server 2025
- **`get-docker.sh`** — Docker Engine installation script for Linux, synchronised
weekly from upstream
## Usage ## Usage
Each service lives under its own directory within `compose/`. Copy the Each service lives under its own directory within `compose/`. Copy the
+13
View File
@@ -0,0 +1,13 @@
# PostgreSQL (Alpine) — environment variables
# Copy this file to .env and adjust values for your environment.
# Superuser name (default: postgres).
POSTGRES_USER=postgres
# Superuser password.
# The default is for local development only — always change for production.
POSTGRES_PASSWORD=postgres
# Default database created automatically on first start.
# Defaults to the value of POSTGRES_USER if not set.
POSTGRES_DB=postgres
+33
View File
@@ -0,0 +1,33 @@
# Docker Compose file for PostgreSQL (Alpine)
#
# Usage:
# docker compose up -d
#
# Environment variables (see .env.example for details):
# POSTGRES_USER - Superuser name (default: postgres)
# POSTGRES_PASSWORD - Superuser password (default: postgres)
# POSTGRES_DB - Default database created on first start (default: postgres)
services:
postgres:
# For available image tags, see https://hub.docker.com/_/postgres
image: postgres:18-alpine
container_name: postgres
environment:
# Superuser name. Defaults to "postgres" if not set.
- POSTGRES_USER=${POSTGRES_USER:-postgres}
# Superuser password.
# Default value is for local development only — change for production.
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
# Database created automatically on first start.
# Defaults to the value of POSTGRES_USER if not set.
- POSTGRES_DB=${POSTGRES_DB:-postgres}
ports:
# Map host port 5432 to container port 5432 (PostgreSQL default).
- "5432:5432"
volumes:
# Persist data beyond container lifetime.
- postgres_data:/var/lib/postgresql/data
volumes:
postgres_data: