pgschema icon indicating copy to clipboard operation
pgschema copied to clipboard

[Request] Publish new docker image version

Open czlowiek488 opened this issue 8 months ago • 1 comments

I'm finishing up database setup in my project.

The most convenient cross-platform solution that will work for all developers is using pgschema via docker image.

I already have other tools that I run through docker, so this is convenient for me in this specific scenario.

Below docker compose file that runs together with main docker compose file where postgres is defined. Something like this.

version: "3.8"

services:
  pgschema:
    container_name: pgschema
    image: pgplex/pgschema:latest
    depends_on:
      postgres:
        condition: service_healthy
    volumes:
      - ./plan.sql:/plan.sql
      - ./plan.json:/plan.json
      - ./schema:/schema
    networks:
      - app-network
    environment:
      PGHOST: ${DB_POSTGRES_HOST}
      PGDATABASE: ${DB_POSTGRES_DB}
      PGPORT: 5432
      PGUSER: ${DB_POSTGRES_USER}
      PGPASSWORD: ${DB_POSTGRES_PASSWORD}
      PGSCHEMA_PLAN_HOST: ${DB_POSTGRES_HOST}
      PGSCHEMA_PLAN_DB: ${DB_POSTGRES_DB}
      PGSCHEMA_PLAN_PORT: 5432
      PGSCHEMA_PLAN_USER: ${DB_POSTGRES_USER}
      PGSCHEMA_PLAN_PASSWORD: ${DB_POSTGRES_PASSWORD}
Image

I execute plan via taskfile with config like below.

  run-pgschema:
    internal: true
    vars:
      cmd: '{{.cmd}}'
    cmds:
      - echo '{{.cmd}}'
      - docker compose -f docker-compose.yml -f docker-compose.pgschema.yml run --remove-orphans pgschema {{.cmd}}
  db-plan:
    dotenv: ['.env']
    desc: Generates database plan to make running database match schema/*.sql
    cmds:
     - task: run-pgschema
       vars:
          cmd: plan --schema public --file schema/main.sql --no-color --output-json plan.json --output-sql plan.sql --output-human stdout

Unfortunately latest docker image version is like below.

backend-node main  ✗ docker run pgschema/pgschema:latest --debug
Declarative schema migration for Postgres

Version: 1.6.2@94ac6d2 linux/amd64 2026-02-07 06:43:03

comparing to the version installed on my Arch machine

backend-node main  ✗ pgschema --debug
Declarative schema migration for Postgres

Version: 1.7.3@a570fad5 linux/amd64 2026-02-28 06:13:13

Could you publish new version to dockerhub?

Also what do you think about setting up automated deployment to dockerhub on each release?

I never did dockerhub auomations but if you would like my help I can take a look on it.

czlowiek488 avatar Mar 08 '26 17:03 czlowiek488

Huh, nevermind it looks like I just got confused.

Looks like there are 2 projects with pgschema on dockerhub

  • https://hub.docker.com/r/pgplex/pgschema
  • https://hub.docker.com/r/pgschema/pgschema (depracated)

czlowiek488 avatar Mar 08 '26 19:03 czlowiek488