mirror of
https://github.com/esauflores/databases.git
synced 2026-03-09 06:30:34 +00:00
b8a6a37e7062a90e8e138bb223a8bea6d3da8a73
databases
Custom database Docker images, built for local development and self-hosted deployments.
Supported Variants
| Variant | Base Image |
|---|---|
postgres |
postgres:18.3-alpine |
Prerequisites
mise install
Configuration
Copy .env.example to .env and adjust as needed:
cp .env.example .env
| Variable | Default | Description |
|---|---|---|
REGISTRY_URL |
(empty) | Container registry URL for publishing |
POSTGRES_USER |
postgres |
Postgres superuser name |
POSTGRES_PASSWORD |
postgres |
Postgres superuser password |
POSTGRES_DB |
postgres |
Default database name |
POSTGRES_PORT |
5432 |
Host port mapped to Postgres |
Usage
# Build image locally
just build [db]
# Start database (waits until healthy)
just db-up [db]
# Stop database and remove volumes
just db-down [db]
# Run tests
just test [db]
# Build and push to registry
just publish [db]
db defaults to postgres when not specified.
CI/CD
The GitHub Actions workflow (.github/workflows/test-and-push.yml) triggers on v* tag pushes:
- Test — spins up the database and verifies connectivity
- Publish — builds and pushes the image to the configured registry
Required repository secrets: REGISTRY_URL, REGISTRY_USERNAME, REGISTRY_PASSWORD.
Adding a New Variant
- Create
<db>/Dockerfileand<db>/compose.yml - Add a
_test-<db>recipe and a case entry intestin theJustfile - Add
<db>to thematrix.dblist in.github/workflows/test-and-push.yml - Add any new env vars to
.env.example
Description
Languages
Just
93.5%
Dockerfile
6.5%