name: portabase-dev-func

services:
  keycloak:
    image: quay.io/keycloak/keycloak:latest
    command: start-dev --import-realm
    # environment:
    #   KC_BOOTSTRAP_ADMIN_USERNAME: admin
    #   KC_BOOTSTRAP_ADMIN_PASSWORD: admin
    ports:
      - "3056:8080"
    volumes:
      - keycloak-data:/opt/keycloak/data
      - ./seeds/keycloak:/opt/keycloak/data/import:ro
      - ./export:/tmp/export
  pocket-id:
    image: ghcr.io/pocket-id/pocket-id
    restart: unless-stopped
    environment:
      - APP_URL=http://localhost:3055
      - ENCRYPTION_KEY=QwHyjbZvSsDUAcjpdmSPsuYxaH6vET6OeBaeLwXccCb43L6Om3W1AoU5pKIJTzYr
    ports:
      - 3055:1411
    volumes:
      - pocket-id-data:/app/data
      - ./seeds/pocket-id:/seed:ro
    healthcheck:
      test: "curl -f http://localhost:1411/healthz"
      interval: 1m30s
      timeout: 5s
      retries: 2
      start_period: 10s
volumes:
  keycloak-data:
  pocket-id-data:
