mirror of
https://github.com/floci-io/floci.git
synced 2026-11-29 08:31:53 -05:00
feat(lambda): bind-mount hot-reload via S3Bucket=hot-reload (#601)
* 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
This commit is contained in:
1 parent
7dbd0225d4
commit
404b42bdc0
14 files changed
+462
-14
No files matched your search
@@ -103,6 +103,7 @@ jobs:
|
||||
-e FLOCI_BASE_URL=http://floci:4566 \
|
||||
-e FLOCI_SERVICES_DOCKER_NETWORK=compat-net \
|
||||
-e FLOCI_HOSTNAME=floci \
|
||||
-e FLOCI_SERVICES_LAMBDA_HOT_RELOAD_ENABLED=true \
|
||||
floci:test
|
||||
|
||||
- name: Wait for floci to be ready
|
||||
@@ -137,6 +138,13 @@ jobs:
|
||||
EXTRA_ARGS="-v /var/run/docker.sock:/var/run/docker.sock --group-add $DOCKER_GID"
|
||||
fi
|
||||
|
||||
# sdk-test-java: mount a host-side directory so the Docker daemon can
|
||||
# bind-mount hot-reload code paths that are written by the test container.
|
||||
if [ "${{ matrix.test }}" = "sdk-test-java" ]; then
|
||||
mkdir -p /tmp/floci-hot-reload
|
||||
EXTRA_ARGS="$EXTRA_ARGS -v /tmp/floci-hot-reload:/tmp/floci-hot-reload -e HOT_RELOAD_BASE_DIR=/tmp/floci-hot-reload"
|
||||
fi
|
||||
|
||||
docker run --rm --network compat-net \
|
||||
-e FLOCI_ENDPOINT=http://floci:4566 \
|
||||
-v "$(pwd)/test-results:/results" \
|
||||
|
||||
Reference in new issue
Block a user