* fix(docker): enable TLS and sync docker test runner with compatibility workflow
The local docker compose stack ran without FLOCI_TLS_ENABLED and the EC2 mock,
and run-docker-tests.sh lacked the hot-reload bind mount, so the node TLS/WSS
suites and the Java Lambda hot-reload test failed locally while passing in CI.
Mirror the compatibility workflow's configuration so local runs exercise the
same setup.
* fix: remove FLOCI_SERVICES_EC2_MOCK from docker-compose
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
---------
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
Replace the FLOCI_STORAGE_HOST_PERSISTENT_PATH footgun with automatic
named Docker volume management for RDS, OpenSearch, MSK, and ECR.
- Each resource gets a collision-free 6-char hex volumeId generated once
at creation and stored in the model. Container and volume names both use
it: floci-{service}-{volumeId}
- Volumes are labelled floci=true for easy pruning
- Memory mode always removes volumes on resource delete. Persistent modes
retain by default; set prune-volumes-on-delete: true to remove on delete
- Mode detection: FLOCI_STORAGE_HOST_PERSISTENT_PATH set to an absolute
path → host bind-mount mode (legacy); unset or non-absolute → named-
volume mode. Volume names in host-persistent-path are not supported
- Removed the container-storage config key — no longer needed
- Updated docker-compose.yml, and all docs
- Translate LocalStack env vars (LOCALSTACK_HOST, PERSISTENCE, LAMBDA_DOCKER_NETWORK, etc.)
to Floci equivalents automatically at startup; opt out with LOCALSTACK_PARITY=false
- Serve /_localstack/init and /_localstack/health alongside /_floci/* equivalents
- Report executed scripts with path, state, and return_code in /_floci/init response
- Add /_aws/sqs/messages GET (non-destructive peek) and DELETE (purge) inspection endpoint
- Add /_aws/execute-api/{apiId}/{stageName} LocalStack-compat path for REST API invocation
- Add four-phase init hook lifecycle (boot/start/ready/stop) with dual-path discovery
(/etc/floci/init/ and /etc/localstack/init/ compat paths)
- Install Python 3, AWS CLI, boto3 in standard image; wrap aws binary to pre-configure
--endpoint-url=http://localhost:4566 so init scripts need no extra flags
- Wire entrypoint.sh + gosu privilege drop into all Dockerfile variants
- Add migration guide and update README, docker-compose, docker-images, SQS, and
initialization-hooks docs
* feat(lambda): add bind-mount hot-reload mode via S3Bucket=hot-reload
Functions created with S3Bucket=hot-reload and S3Key=/absolute/path
have their host directory bind-mounted into /var/task rather than
packaged as a ZIP. Each invocation runs an ephemeral container so
file changes on disk are picked up immediately without calling
UpdateFunctionCode or re-uploading code.
Feature is disabled by default; opt in with:
FLOCI_SERVICES_LAMBDA_HOT_RELOAD_ENABLED=true
An optional path allowlist (FLOCI_SERVICES_LAMBDA_HOT_RELOAD_ALLOWED_PATHS)
restricts which host directories may be bind-mounted.
* fix: missing hot reload enable env
* 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
* fix(lambda): release container handle on timeout instead of draining warm pool
* fix: fix container lifecycle on timeout
* fix(lambda): correct /next poll loop condition and restore response handling
Flip while loop to `invocation == null && !stopped` so the poll actually
runs (previous condition was unreachable because invocation starts null).
Restore the 204 response on null return and the 500 response on
InterruptedException so the handler never leaves the response open.
Without this fix, every RIC call to /next hangs, which also broke the
existing LambdaReactiveSyncIntegrationTest with SocketTimeout.
---------
Co-authored-by: Ricardo Lima <ricardo.hrlima@gmail.com>
* fix(ecr): fixing port and network issues on ecr
* fix: issue on merge with main
* fix(ecr): connect containers to network after start only when port bindings exist
* feat(lifecycle): add support for startup and shutdown initialization hooks
* test(lifecycle): add unit tests for initialization hooks
* test(lifecycle): add integration tests for initialization hooks
* docs: add documentation and configuration for initialization hooks