---
version: "3.2"
services:
  web:
    image: "uwcirg-portal-docker.jfrog.io/${IMAGE_NAME:-portal_web}:${IMAGE_TAG:-latest}"
    depends_on:
      - db
      - redis
    ports:
      - "${EXTERNAL_PORT:-8080}:${PORT:-8008}"
    env_file:
      - portal.env
    environment:
      - PERSISTENCE_FILE=${PERSISTENCE_FILE:-https://raw.githubusercontent.com/uwcirg/TrueNTH-USA-site-config/develop/site_persistence_file.json}
      # compose-specific overrides
      - PGUSER=${PGUSER:-postgres}
      - PGPASSWORD=${PGPASSWORD:-""}
      - PGHOST=${PGHOST:-db}
      - PGDATABASE=${PGDATABASE:-postgres}
      - CELERY_BROKER_URL=${CELERY_BROKER_URL:-redis://redis:6379/0}
      - REQUEST_CACHE_URL=${REQUEST_CACHE_URL:-redis://redis:6379/0}
      - SESSION_REDIS_URL=${SESSION_REDIS_URL:-redis://redis:6379/0}
    depends_on:
      - db
      - redis
  redis:
    image: redis
    ports:
      - "6379"
  db:
    image: postgres
    ports:
      - "5432"
    volumes:
      - source: postgres-data
        target: /var/lib/postgresql/data
        type: volume
volumes:
    postgres-data: {}

---
version: "3.2"
services:
  web:
    image: "${REPO:-uwcirg-portal-docker.jfrog.io/}${IMAGE_NAME:-portal_web}:${IMAGE_TAG:-latest}"
    depends_on:
      - db
      - redis
    ports:
      - "${EXTERNAL_PORT:-8080}:${PORT:-8008}"
    env_file:
      - portal.env
    environment:
      - PERSISTENCE_FILE=${PERSISTENCE_FILE:-https://raw.githubusercontent.com/uwcirg/TrueNTH-USA-site-config/develop/site_persistence_file.json}
      # compose-specific overrides
      - PGUSER=${PGUSER:-postgres}
      - PGPASSWORD=${PGPASSWORD:-""}
      - PGHOST=${PGHOST:-db}
      - PGDATABASE=${PGDATABASE:-postgres}
      - CELERY_BROKER_URL=${CELERY_BROKER_URL:-redis://redis:6379/0}
      - REQUEST_CACHE_URL=${REQUEST_CACHE_URL:-redis://redis:6379/0}
      - SESSION_REDIS_URL=${SESSION_REDIS_URL:-redis://redis:6379/0}
    depends_on:
      - db
      - redis
  redis:
    image: redis
    ports:
      - "6379"
  db:
    image: postgres
    ports:
      - "5432"
    volumes:
      - source: postgres-data
        target: /var/lib/postgresql/data
        type: volume
volumes:
    postgres-data: {}

Allow repo URL in image name to be overridden
Allow repo URL in image name to be overridden
