diff --git a/app/data/container-build/cerc-laconic-console-host/Dockerfile b/app/data/container-build/cerc-laconic-console-host/Dockerfile index fe5e50ae..66eec1f5 100644 --- a/app/data/container-build/cerc-laconic-console-host/Dockerfile +++ b/app/data/container-build/cerc-laconic-console-host/Dockerfile @@ -41,6 +41,7 @@ COPY --from=docker.io/mikefarah/yq:latest /usr/bin/yq /usr/local/bin/yq RUN mkdir -p /scripts COPY ./apply-webapp-config.sh /scripts +COPY ./start-serving-app.sh /scripts # [Optional] Uncomment if you want to install more global node modules # RUN su node -c "npm install -g " @@ -59,11 +60,8 @@ RUN yarn global add http-server # Globally install the payload web app package RUN yarn global add @cerc-io/console-app -# Run this script to substitute the config values into the unpackaged webapp files: -# ./scripts/apply-webapp-config.sh ./config/config.yml /usr/local/share/.config/yarn/global/node_modules/@cerc-io/console-app/dist/production - # Expose port for http EXPOSE 80 # Default command sleeps forever so docker doesn't kill it -CMD ["http-server", "-p", "80", "/usr/local/share/.config/yarn/global/node_modules/@cerc-io/console-app/dist/production"] +CMD ["/scripts/start-serving-app.sh"] diff --git a/app/data/container-build/cerc-laconic-console-host/start-serving-app.sh b/app/data/container-build/cerc-laconic-console-host/start-serving-app.sh old mode 100644 new mode 100755 index ab466678..a322e5fb --- a/app/data/container-build/cerc-laconic-console-host/start-serving-app.sh +++ b/app/data/container-build/cerc-laconic-console-host/start-serving-app.sh @@ -2,3 +2,7 @@ if [ -n "$CERC_SCRIPT_DEBUG" ]; then set -x fi +# TODO: Don't hard wire this: +webapp_files_dir=/usr/local/share/.config/yarn/global/node_modules/@cerc-io/console-app/dist/production +/scripts/apply-webapp-config.sh /config/config.yml ${webapp_files_dir} +http-server -p 80 ${webapp_files_dir}