diff options
author | Liam Crilly <liam.crilly@nginx.com> | 2023-05-09 19:19:36 +0100 |
---|---|---|
committer | Liam Crilly <liam.crilly@nginx.com> | 2023-05-09 19:19:36 +0100 |
commit | 20a5fd44acd4ccdd95a3425dcb095623e8872848 (patch) | |
tree | 6d11ef2dab2407973981cafec3bf0854fe67cfb6 | |
parent | a3c3a29493798873ad04922bb2a7180b2ce267d5 (diff) | |
download | unit-20a5fd44acd4ccdd95a3425dcb095623e8872848.tar.gz unit-20a5fd44acd4ccdd95a3425dcb095623e8872848.tar.bz2 |
Docker: add support for JavaScript modules.
-rwxr-xr-x | pkg/docker/docker-entrypoint.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pkg/docker/docker-entrypoint.sh b/pkg/docker/docker-entrypoint.sh index 4d16bdc5..c670c2e6 100755 --- a/pkg/docker/docker-entrypoint.sh +++ b/pkg/docker/docker-entrypoint.sh @@ -47,6 +47,12 @@ if [ "$1" = "unitd" ] || [ "$1" = "unitd-debug" ]; then curl_put $f "certificates/$(basename $f .pem)" done + echo "$0: Looking for JavaScript modules in /docker-entrypoint.d/..." + for f in $(/usr/bin/find /docker-entrypoint.d/ -type f -name "*.js"); do + echo "$0: Uploading JavaScript module: $f" + curl_put $f "js_modules/$(basename $f .js)" + done + echo "$0: Looking for configuration snippets in /docker-entrypoint.d/..." for f in $(/usr/bin/find /docker-entrypoint.d/ -type f -name "*.json"); do echo "$0: Applying configuration $f"; @@ -60,7 +66,7 @@ if [ "$1" = "unitd" ] || [ "$1" = "unitd-debug" ]; then done # warn on filetypes we don't know what to do with - for f in $(/usr/bin/find /docker-entrypoint.d/ -type f -not -name "*.sh" -not -name "*.json" -not -name "*.pem"); do + for f in $(/usr/bin/find /docker-entrypoint.d/ -type f -not -name "*.sh" -not -name "*.json" -not -name "*.pem" -not -name "*.js"); do echo "$0: Ignoring $f"; done |