Create docker-entrypoint.sh
Browse files- docker-entrypoint.sh +17 -0
docker-entrypoint.sh
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/sh
|
2 |
+
|
3 |
+
app_data_dir="/home/node/.n8n"
|
4 |
+
|
5 |
+
if [ ! -d "$app_data_dir" ]; then
|
6 |
+
mkdir -p "$app_data_dir"
|
7 |
+
fi
|
8 |
+
|
9 |
+
chown -R node:node /home/node
|
10 |
+
|
11 |
+
if [ "$#" -gt 0 ]; then
|
12 |
+
# Got started with arguments
|
13 |
+
exec su-exec node "$@"
|
14 |
+
else
|
15 |
+
# Got started without arguments
|
16 |
+
exec su-exec node n8n
|
17 |
+
fi
|