Sign inSign up

vitamin2001/debian13-postgres-cron-partman-oracle_fdw

By vitamin2001

•Updated about 1 month ago

Debian 13+ Postgres + Cron + partman + oracle_fdw

Image
Data science
0

73

vitamin2001/debian13-postgres-cron-partman-oracle_fdw repository overview

⁠Debian 13 (Trixie) with PostgreSQL 17, pg_cron, pg_partman, and oracle_fdw

A production-ready, heavy-duty PostgreSQL 17 image built on top of Debian 13 (Slim). This image is pre-configured and optimized for enterprise Data Warehousing (DWH), time-series automation, and seamless data federation with Oracle databases.

⁠🚀 Key Features & Extensions

  • Base OS: Debian 13 (Trixie) Slim distribution.
  • Database: PostgreSQL 17 initialized with en_US.UTF-8 locale.
  • Pre-installed Extensions:
    • pg_cron (v1.7+): Run periodic SQL tasks directly inside native PostgreSQL background workers.
    • pg_partman (v5.x): Advanced automation tool for declarative time-based and number-based table partitioning.
    • oracle_fdw: High-performance Foreign Data Wrapper to query and sync remote Oracle instances.
  • Oracle Runtimes: Bundled with official Oracle Instant Client & SDK (v23) with fully configured libaio dependencies.

⁠🔒 Security & Environment Setup

This image initializes a pre-configured database named dwh owned by the user dwh. Never hardcode passwords inside your containers. Pass your secure configuration dynamically during container startup.

⁠⚙️ How to Run

⁠Via Docker CLI
docker run -d \
  --name pg_dwh_prod \
  -e POSTGRES_USER=dwh_admin \
  -e POSTGRES_PASSWORD=YourStrongSecretPassword123! \
  -e POSTGRES_DB=dwh \
  -p 5432:5432 \
  vitamin2001/debian13-postgres-cron-partman-oracle_fdw:1.0
⁠Via Docker Compose (docker-compose.yml)
version: '3.8'

services:
  postgres_dwh:
    image: vitamin2001/debian13-postgres-cron-partman-oracle_fdw:1.0
    container_name: dwh_database
    restart: unless-stopped
    environment:
      POSTGRES_USER: dwh_admin
      POSTGRES_PASSWORD: YourStrongSecretPassword123!
      POSTGRES_DB: dwh
    ports:
      - "5432:5432"
    volumes:
      - pg_dwh_data:/var/lib/postgresql/data

volumes:
  pg_dwh_data:

⁠🛠️ Post-Deployment Initializations

Once connected to your dwh database, extensions are ready to use out of the box.

⁠1. Linking an Oracle Server
CREATE SERVER oracle_server 
FOREIGN DATA WRAPPER oracle_fdw 
OPTIONS (dbserver '//oracle-host.domain:1521/ORADB');

CREATE USER MAPPING FOR dwh_admin SERVER oracle_server 
OPTIONS (user 'ora_user', password 'ora_password');
⁠2. Automating Partitions with pg_partman
-- Example: Automate daily partitioning for a sales table
SELECT partman.create_parent('dwh.sales', 'sale_date', 'native', 'daily');

Tag summary

Content type

Image

Digest

sha256:366e6aca9…

Size

701.3 MB

Last updated

about 1 month ago

docker pull vitamin2001/debian13-postgres-cron-partman-oracle_fdw:1.0