Sign inSign up

codingjoe/the-box-postgres:0.0.5

Manifest digest

sha256:e0d1ccfc8cddd639a56946585ab644dd0e8ad3870b0d0c99b2d48950b880c2ad

Last pushed

7 months by codingjoe

Type

Compose

Manifest digest

sha256:e0d1ccfc8cddd639a56946585ab644dd0e8ad3870b0d0c99b2d48950b880c2ad

Compose file content

name: containers
networks:
  app:
    driver: bridge
    internal: true
    name: containers_app
  app-wan:
    driver: bridge
    name: containers_app-wan
  caddy:
    external: true
    name: caddy
services:
  postgres:
    environment:
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
    healthcheck:
      interval: 10s
      retries: 5
      start_period: 30s
      test:
        - CMD-SHELL
        - pg_isready -U postgres -d postgres
      timeout: 10s
    image: supabase/postgres:17.5.1.070-orioledb
    networks:
      app: null
    restart: unless-stopped
    volumes:
      - source: postgres
        target: /var/lib/postgresql/data
        type: volume
        volume: {}
  web:
    depends_on:
      postgres:
        condition: service_healthy
        required: true
        restart: true
    deploy:
      mode: replicated
      replicas: 2
      resources:
        limits:
          cpus: "0.25"
          memory: 512M
    environment:
      - PORT=${PORT:-8000}
      - DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgres/postgres
    image: traefik/whoami:latest
    labels:
      caddy: ${HOSTNAME:-localhost}
      caddy.reverse_proxy: '{{upstreams ${PORT:-8000}}}'
      caddy.reverse_proxy.health_headers.X-Forwarded-Host: ${HOSTNAME:-localhost}
      caddy.reverse_proxy.health_headers.X-Forwarded-Proto: https
      caddy.reverse_proxy.health_uri: /
      caddy.reverse_proxy.lb_policy: round_robin
    memswap_limit: 1g
    networks:
      app: null
      app-wan: null
      caddy: null
    stop_grace_period: 1m
volumes:
  postgres:
    name: containers_postgres

Docker commands

docker compose -f oci://codingjoe/the-box-postgres:0.0.5 up

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

Images used

Image

Tiny Go webserver that prints OS information and HTTP request to output


Pulls

10M+

Stars

72

Last Updated

about 2 months

Image

Unmodified Postgres with some useful plugins.


Pulls

10M+

Stars

78

Last Updated

3 days