From a6386f56aabea0c62ae347ac330b6385a5f742c9 Mon Sep 17 00:00:00 2001 From: andytson-inviqa Date: Tue, 25 Jul 2023 16:44:21 +0100 Subject: [PATCH] Update console to use node user, and start:dev run yarn install again (#33) --- .ci/sample-dynamic/workspace.yml | 2 +- .ci/sample-static/workspace.yml | 2 +- harness/attributes/common-spa.yml | 2 ++ harness/attributes/docker-spa.yml | 2 ++ harness/config/confd.yml | 2 +- 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.ci/sample-dynamic/workspace.yml b/.ci/sample-dynamic/workspace.yml index ed69ae0..8223e10 100644 --- a/.ci/sample-dynamic/workspace.yml +++ b/.ci/sample-dynamic/workspace.yml @@ -1,6 +1,6 @@ workspace('ci-node-spa-sample-dynamic'): description: generated local workspace for ci-node-spa-sample. harnessLayers: - - https://github.com/inviqa/harness-docker/archive/refs/tags/0.2.0-alpha1.tar.gz + - https://github.com/inviqa/harness-docker/archive/refs/tags/0.2.0-alpha2.tar.gz attribute('app.build'): dynamic diff --git a/.ci/sample-static/workspace.yml b/.ci/sample-static/workspace.yml index a7f2017..52a288e 100644 --- a/.ci/sample-static/workspace.yml +++ b/.ci/sample-static/workspace.yml @@ -1,6 +1,6 @@ workspace('ci-node-spa-sample-static'): description: generated local workspace for ci-node-spa-sample. harnessLayers: - - https://github.com/inviqa/harness-docker/archive/refs/tags/0.2.0-alpha1.tar.gz + - https://github.com/inviqa/harness-docker/archive/refs/tags/0.2.0-alpha2.tar.gz attribute('app.build'): static diff --git a/harness/attributes/common-spa.yml b/harness/attributes/common-spa.yml index 3f762d6..c2409f1 100644 --- a/harness/attributes/common-spa.yml +++ b/harness/attributes/common-spa.yml @@ -2,6 +2,7 @@ attributes.default: app: node_web_port: 3000 web_directory: /usr/share/nginx/html + code_owner: node tasks: build: @@ -11,6 +12,7 @@ attributes.default: - "= @('app.build') == 'static' ? 'yarn build' : ''" start_dev: steps: + - passthru yarn install - yarn dev nginx: diff --git a/harness/attributes/docker-spa.yml b/harness/attributes/docker-spa.yml index cd21e49..bc7e939 100644 --- a/harness/attributes/docker-spa.yml +++ b/harness/attributes/docker-spa.yml @@ -13,6 +13,8 @@ attributes.default: memory: 64Mi console: enabled: = @('app.build') == 'dynamic' + build: + from: = 'node:' ~ @('node.version') ~ '-slim' publish: false pipeline: diff --git a/harness/config/confd.yml b/harness/config/confd.yml index e1f95c5..4305a75 100644 --- a/harness/config/confd.yml +++ b/harness/config/confd.yml @@ -2,8 +2,8 @@ confd('harness:/'): # base templates - { src: docker/image/console/Dockerfile } + - { src: docker/image/console/home/.my.cnf } - { src: docker/image/console/root/entrypoint.sh } - - { src: docker/image/console/root/home/build/.my.cnf } - { src: docker/image/console/root/usr/lib/task/build.sh } - { src: docker/image/console/root/usr/lib/task/database/import.sh } - { src: docker/image/console/root/usr/lib/task/init.sh }