Sign inSign up

sviluppotecha/ela-postgres-stack:0.2

Manifest digest

sha256:117276501cab395ad92bcfbd3c2e4b8637f3d4ea74fb1dcc0f891010f93eb15e

Last pushed

1 day by sviluppotecha

Type

Compose

Manifest digest

sha256:117276501cab395ad92bcfbd3c2e4b8637f3d4ea74fb1dcc0f891010f93eb15e

Compose file content

services:
  db:
    image: sviluppotecha/ela-postgres:0.2
    container_name: ela-postgres-db
    environment:
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD in .env file}
      POSTGRES_DB: ${POSTGRES_DB:-ELA_test_db}
    ports:
      - "127.0.0.1:5432:5432"
    volumes:
      - postgres_data:/var/lib/postgresql
    healthcheck:
      test: ["CMD", "pg_isready", "-h", "127.0.0.1", "-U", "postgres"]
      interval: 5s
      retries: 5

  db-init:
    image: sviluppotecha/ela-postgres:0.2
    depends_on:
      db:
        condition: service_healthy
    environment:
      PGHOST: db
      PGUSER: postgres
      PGPASSWORD: ${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD in .env file}
      PGDATABASE: ${POSTGRES_DB:-ELA_test_db}
      PGOPTIONS: -c client_min_messages=warning
    entrypoint:
      - bash
      - -c
      - |
        shopt -s nullglob
        for f in /init-db/*.sql; do
          echo "db-init: running $$f"
          psql -v ON_ERROR_STOP=1 --single-transaction -q -f "$$f" || exit 1
        done
    restart: "no"

  pgadmin:
    image: dpage/pgadmin4:9.19
    environment:
      PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:?Set PGADMIN_DEFAULT_EMAIL in .env file}
      PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:?Set PGADMIN_DEFAULT_PASSWORD in .env file}
    volumes:
      - pgadmin_data:/var/lib/pgadmin
    ports:
      - "8095:80"

volumes:
  postgres_data:
  pgadmin_data:

Docker commands

docker compose -f oci://sviluppotecha/ela-postgres-stack:0.2 up

Use the above command to pull and run the Compose file. Learn more⁠.

Images used

Image

pgAdmin 4 is a web based administration tool for the PostgreSQL database.


Pulls

100M+

Stars

1516

Last Updated

9 days

Image


Pulls

0

Stars

0

Last Updated

1 day