Skip to content

Commit 20a5fd4

Browse files
committed
Docker: add support for JavaScript modules.
1 parent a3c3a29 commit 20a5fd4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pkg/docker/docker-entrypoint.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ if [ "$1" = "unitd" ] || [ "$1" = "unitd-debug" ]; then
4747
curl_put $f "certificates/$(basename $f .pem)"
4848
done
4949

50+
echo "$0: Looking for JavaScript modules in /docker-entrypoint.d/..."
51+
for f in $(/usr/bin/find /docker-entrypoint.d/ -type f -name "*.js"); do
52+
echo "$0: Uploading JavaScript module: $f"
53+
curl_put $f "js_modules/$(basename $f .js)"
54+
done
55+
5056
echo "$0: Looking for configuration snippets in /docker-entrypoint.d/..."
5157
for f in $(/usr/bin/find /docker-entrypoint.d/ -type f -name "*.json"); do
5258
echo "$0: Applying configuration $f";
@@ -60,7 +66,7 @@ if [ "$1" = "unitd" ] || [ "$1" = "unitd-debug" ]; then
6066
done
6167

6268
# warn on filetypes we don't know what to do with
63-
for f in $(/usr/bin/find /docker-entrypoint.d/ -type f -not -name "*.sh" -not -name "*.json" -not -name "*.pem"); do
69+
for f in $(/usr/bin/find /docker-entrypoint.d/ -type f -not -name "*.sh" -not -name "*.json" -not -name "*.pem" -not -name "*.js"); do
6470
echo "$0: Ignoring $f";
6571
done
6672

0 commit comments

Comments
 (0)