warg-cli 0.3.0

The warg registry command line interface.
Documentation
# PostgreSQL-enabled configuration override for the registry service
services:
  db:
    # NOTE: Note as of 2023-04-26 not all IaaS supports v15 for managed SQL
    image: postgres:14
    restart: always
    environment:
      POSTGRES_DB: warg_registry
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD_FILE: /var/secrets/warg/data-store/postgres/password
    ports:
      - "${WARG_POSTGRES_LISTEN_ADDRESS?e.g., 127.0.0.1:17514}:5432"
    healthcheck:
      test: [ "CMD", "pg_isready", "-q", "-d", "warg_registry", "-U", "postgres" ]
      interval: 1s
      timeout: 1s
      retries: 30
    volumes:
      - warg-secrets:/var/secrets/warg:ro
      - postgres-data:/var/lib/postgresql/data:rw
    networks:
      - infra
    depends_on:
      import-secrets:
        condition: service_completed_successfully
  warg-registry-db-migration:
    build:
      target: warg-postgres-migration
    depends_on:
      db:
        condition: service_healthy
      import-secrets:
        condition: service_completed_successfully
    env_file:
      - ./infra/local/.secrets/data-store/postgres/database_url_env
    networks:
      - infra
  warg-registry:
    depends_on:
      import-secrets:
        condition: service_completed_successfully    
      warg-registry-db-migration:
        condition: service_completed_successfully
    # Database config using cli args because base config already set from base environment.
    # NOTE: Test for cli args support.
    command: 
      - --data-store
      - postgres
      - --database-url-file
      - /var/secrets/warg/data-store/postgres/database_url
volumes:
  postgres-data: