Skip to content

application.yml Reference

Source builds only

This page is for users who build floci-gcp from source or mount a custom application.yml into the container. If you run the published Docker image, you don't need this file — all settings are configured through FLOCI_GCP_* environment variables. See the Environment Variables Reference for the complete list.

All settings can be provided as YAML (in src/main/resources/application.yml) or overridden via environment variables using the FLOCI_GCP_ prefix with dots and dashes replaced by underscores.

URL Configuration

floci-gcp generates absolute URLs for certain response fields (GCS object URLs, pre-signed URLs). Two settings control the hostname embedded in those URLs:

Setting Env variable Default Description
floci-gcp.base-url FLOCI_GCP_BASE_URL http://localhost:4588 Full base URL used to build response URLs
floci-gcp.hostname FLOCI_GCP_HOSTNAME (none) Override only the hostname in base-url. Useful in Docker Compose where localhost is unreachable from other containers

When floci-gcp.hostname is set it replaces just the host portion of base-url, leaving the scheme and port unchanged. Setting FLOCI_GCP_HOSTNAME: floci-gcp is equivalent to changing base-url from http://localhost:4588 to http://floci-gcp:4588.

Example — Docker Compose multi-container setup:

environment:
  FLOCI_GCP_HOSTNAME: floci-gcp   # matches the compose service name
  FLOCI_GCP_BASE_URL: http://floci-gcp:4588

See Docker Compose — Multi-container networking for a full example.

Full Reference

The block below mirrors src/main/resources/application.yml.

floci-gcp:
  port: 4588
  max-request-size: 512
  base-url: "http://localhost:4588"  # Used to build GCS object URLs and pre-signed URLs
  # hostname: ""                     # When set, overrides the host in base-url for multi-container Docker
  default-project-id: floci-local

  storage:
    mode: memory                      # memory | persistent | hybrid | wal
    persistent-path: ./data
    host-persistent-path: ./data
    prune-volumes-on-delete: false
    wal:
      compaction-interval-ms: 30000

  services:
    gcs:
      enabled: true
    pubsub:
      enabled: true
    firestore:
      enabled: true
    datastore:
      enabled: true
    iam:
      enabled: true
    iamcredentials:
      enabled: true
    secretmanager:
      enabled: true
    logging:
      enabled: true
    kms:
      enabled: true
    kafka:
      enabled: true
      mock: false
      default-image: "redpandadata/redpanda:latest"
    cloudsql:
      enabled: true
      mock: false
      postgres15-image: "postgres:15.18-alpine"
      postgres16-image: "postgres:16.14-alpine"
      postgres17-image: "postgres:17.10-alpine"
      postgres18-image: "postgres:18.4-alpine"
      startup-timeout-seconds: 90
    cloudtasks:
      enabled: true
    cloudrun:
      enabled: true
      mock: false                     # false runs Docker-backed service execution
      execution:
        default-port: 8080
        startup-timeout: 240s
        request-timeout: 300s
        operation-timeout: 300s
        cleanup-timeout: 15s
        url-host-suffix:              # Optional; defaults to hostname, then localhost.floci.io
    cloudfunctions:
      enabled: true
    monitoring:
      enabled: true
    scheduler:
      enabled: true
      invocation-enabled: true        # background dispatcher fires due jobs
      tick-interval-seconds: 10
    eventarc:
      enabled: true
    bigquery:
      enabled: true
    gke:
      enabled: true
      mock: false                     # false starts real rancher/k3s clusters
      default-image: "rancher/k3s:latest"
      api-server-base-port: 6550
      api-server-max-port: 6599
      keep-running-on-shutdown: false
      endpoint-mode: host             # host | network (network for emulator-in-Docker setups)
      docker-network:                 # overrides services.docker-network for k3s sidecars
    serviceusage:
      enabled: true
    resourcemanager:
      enabled: true
    firebaseauth:
      enabled: true
    # docker-network:                 # shared Docker network for all spawned sidecars (FLOCI_GCP_SERVICES_DOCKER_NETWORK)

  dns:
    extra-suffixes:
    # Public resolvers appended after floci-gcp's embedded DNS in every spawned container.
    # Lets Cloud Run/GKE/sidecar containers resolve public hostnames even if the embedded
    # forwarder cannot answer. Disable in offline/locked-down networks where these
    # resolvers are blocked.
    container-fallback-enabled: true              # FLOCI_GCP_DNS_CONTAINER_FALLBACK_ENABLED
    container-fallback-servers:                   # FLOCI_GCP_DNS_CONTAINER_FALLBACK_SERVERS=1.1.1.1,1.0.0.1
      - 8.8.8.8
      - 8.8.4.4

  docker:
    log-max-size: "10m"
    log-max-file: "3"
    docker-host: "unix:///var/run/docker.sock"
    api-timeout: 30s
    # docker-config-path:                         # directory containing Docker's config.json for registry auth
    resource-namespace: ""          # FLOCI_GCP_DOCKER_RESOURCE_NAMESPACE; scopes sidecar container/volume names
    # image-registry-base: mirror.example.com     # FLOCI_GCP_DOCKER_IMAGE_REGISTRY_BASE; prefixes every launched image
    # registry-credentials:                       # explicit credentials for private registries
    #   - server: myregistry.example.com
    #     username: user
    #     password: secret

  init-hooks:
    shell-executable: /bin/sh
    shutdown-grace-period-seconds: 2
    timeout-seconds: 30

Disabling Services

Set enabled: false for any service you don't need:

floci-gcp:
  services:
    datastore:
      enabled: false
    iam:
      enabled: false

Via environment variable:

FLOCI_GCP_SERVICES_DATASTORE_ENABLED=false
FLOCI_GCP_SERVICES_IAM_ENABLED=false

Logging

floci-gcp uses standard Quarkus logging. The default effective level is INFO. Services log operation-level events at DEBUG and full request/response payloads at TRACE.

Enable TRACE for a service via environment variables:

# Pub/Sub: log publish/pull bodies
QUARKUS_LOG_CATEGORY__IO_FLOCI_GCP_SERVICES_PUBSUB__LEVEL=TRACE

# Firestore: log read/write operations
QUARKUS_LOG_CATEGORY__IO_FLOCI_GCP_SERVICES_FIRESTORE__LEVEL=TRACE

Or in application.yml:

quarkus:
  log:
    category:
      "io.floci.gcp.services.pubsub":
        level: TRACE
      "io.floci.gcp.services.firestore":
        level: TRACE