36 lines
1.2 KiB
Docker
36 lines
1.2 KiB
Docker
# Copyright 2026 Umbra Tools (umbratools.com)
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
# UmbraDatastore - PostgreSQL with UmbraTrans schema
|
|
# Based on CloudNativePG PostgreSQL 16.4
|
|
|
|
FROM ghcr.io/cloudnative-pg/postgresql:16.4
|
|
|
|
# Install additional extensions if needed
|
|
USER root
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
postgresql-16-pgcrypto \
|
|
postgresql-16-uuid-ossp \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Switch back to postgres user
|
|
USER postgres
|
|
|
|
# Copy migration scripts to be run on initialization
|
|
# These will be executed by CNPG's postInitApplicationSQL or via initdb
|
|
COPY migrations/ /docker-entrypoint-initdb.d/
|
|
|
|
# Labels
|
|
LABEL org.opencontainers.image.title="UmbraDatastore" \
|
|
org.opencontainers.image.description="PostgreSQL with UmbraTrans schema for UmbraTrans" \
|
|
org.opencontainers.image.version="16.4" \
|
|
org.opencontainers.image.source="http://192.168.123.18:3001/umbragit/UmbraDatastore" \
|
|
org.opencontainers.image.licenses="Apache-2.0"
|
|
|
|
# Health check
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
|
CMD pg_isready -U umbratrans -d umbratrans || exit 1
|
|
|
|
# Default command (handled by CNPG)
|
|
CMD ["postgres"]
|