Files
floci/docker-compose.yml
T
Hector Ventura e023936a81 feat(lambda): embedded DNS server for virtual-hosted S3 resolution (#585)
* feat(lambda): embedded DNS server for virtual-hosted S3 resolution

  Lambda containers cannot resolve virtual-hosted S3 URLs
  (my-bucket.floci:4566) because Docker DNS has no wildcard support —
  queries for *.floci fall through to public DNS and hit real AWS.

  Adds a Vert.x UDP/53 DNS server that binds automatically when Floci
  runs inside Docker. It resolves any *.{floci.hostname} query to
  Floci's container IP and forwards everything else upstream. Lambda
  containers receive Floci's IP as their DNS server via HostConfig.withDns().

  An optional floci.dns.extra-suffixes config allows LocalStack migrants
  to route *.localhost.localstack.cloud without changing Lambda code.

  Netty NioDatagramChannel was tried first but silently dropped IPv4
  UDP packets due to AF_INET6 socket defaults — Vert.x DatagramSocket
  with setIpV6(false) resolves this.

* fix: adding missing dns class
2026-04-25 09:33:00 -05:00

30 lines
749 B
YAML

services:
floci:
build:
context: .
dockerfile: Dockerfile.native
ports:
- "4566:4566"
- "6379-6399:6379-6399"
- "7001-7099:7001-7099"
- "9200-9299:9200-9299"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./scripts:/etc/floci/init/start.d
- ./scripts:/etc/floci/init/stop.d
- ./data:/app/data
environment:
FLOCI_SERVICES_DOCKER_NETWORK: floci_default
FLOCI_SERVICES_RDS_PROXY_BASE_PORT: "7001"
FLOCI_STORAGE_HOST_PERSISTENT_PATH: ${PWD}/data
FLOCI_HOSTNAME: floci
FLOCI_BASE_URL: http://floci:4566
networks:
floci_default:
aliases:
- localhost.floci.io
networks:
floci_default:
name: floci_default