aboutsummaryrefslogtreecommitdiff
path: root/ci/container/run.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ci/container/run.sh')
-rw-r--r--ci/container/run.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/ci/container/run.sh b/ci/container/run.sh
new file mode 100644
index 0000000..d829509
--- /dev/null
+++ b/ci/container/run.sh
@@ -0,0 +1,25 @@
+#! /bin/sh
+
+#this script will be invoked by dumb-init in the container on statup and is located at /app
+
+echo "Generating configuration files"
+
+rm -rf config && mkdir config
+
+#move the routes xml file to the output config dir
+cp config-templates/routes.xml config/routes.xml
+
+#substitude all -template files in the config-templates dir and write them to the config dir
+for file in config-templates/*-template.json; do
+ envsubst < $file > config/$(basename $file -template.json).json
+done
+
+echo "Complete"
+
+echo "Merging your asset files"
+cp usr/assets/* plugins/assets/ -rf
+echo "Complete"
+
+#start the server
+echo "Starting the server"
+dotnet webserver/VNLib.WebServer.dll --config config/config.json --input-off $SERVER_ARGS \ No newline at end of file