-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for environment variable placeholders in hot-reloading paths #10857
Conversation
LocalStack Community integration with Pro 2 files 2 suites 1h 39m 30s ⏱️ Results for commit 141ea8a. ♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great flexible idea giving full control to the user @dfangl 💡
Can we add an example to the Hot Reloading docs?
This solution enables a workaround for the CloudPod/Persistence bug #9974
@giograno Do you think this solution is sufficient to resolve #9974?
…ption of hot reloading error test
Motivation
When specifying a path for hot-reloading, we require an absolute path on the host, as it is expected for docker bind mounts.
However, this has an important limitation: Templates with a path defined or Cloudpods cannot be easily shared between systems where the code location differs.
For example, a checked out repository with the code at
/home/user1/shared-repository/src
could be checked out at/home/user2/repositories/shared-repository/src
at another users machine.To enable sharing of templates and cloudpods with hot-reloading paths between different machines without modification, this PR will add the option to use environment variables expansion within the hot-reloading paths. A hot-reloading path like
$HOST_DIR/src
can now be used in the templates or cloud pods, if an environment variable is set in each LocalStack instance using that path, with the concrete absolute path part as its value.This variable could be defined relative to the docker compose project, for example, using a template like this:
Changes
$KEY
or${KEY}