Run template substitution on start
Former-commit-id: e072a6bc4bd5072905b32f9739cfeadca04288fb
This commit is contained in:
@@ -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 <your-package-list-here>"
|
||||
@@ -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"]
|
||||
|
||||
Regular → Executable
+4
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user