25 lines
978 B
Docker
25 lines
978 B
Docker
# syntax=docker/dockerfile:1
|
|
#
|
|
# Postgres image — BUILT, BUT NOT USED BY THE DEFAULT STACK.
|
|
#
|
|
# Every service in docker-compose.yml points at the Postgres already running on the
|
|
# host (DB_HOST=host.docker.internal). This image exists so the database can be
|
|
# containerised on demand — a clean machine, a throwaway test run, a second dev — and
|
|
# it is kept in its own file (docker-compose.postgres.yml) so bringing it up is always
|
|
# a deliberate act:
|
|
#
|
|
# docker compose -f docker-compose.yml -f docker-compose.postgres.yml build postgres
|
|
# docker compose -f docker-compose.yml -f docker-compose.postgres.yml up -d postgres
|
|
#
|
|
# Context is ./docker/postgres.
|
|
|
|
FROM postgres:16-alpine
|
|
|
|
# The inbox tables store tz-aware timestamps and the app reads them as UTC
|
|
# (backend/migrations/versions/20260812_1035-b3f1c2d4e5a6_inbox_timestamps_tz_aware.py).
|
|
ENV TZ=UTC \
|
|
PGTZ=UTC
|
|
|
|
# Runs once, against an empty data volume only.
|
|
COPY initdb/ /docker-entrypoint-initdb.d/
|