Skip to content

Commit

Permalink
Update console to use node user, and start:dev run yarn install again (
Browse files Browse the repository at this point in the history
  • Loading branch information
andytson-inviqa authored Jul 25, 2023
1 parent 7a8256d commit a6386f5
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .ci/sample-dynamic/workspace.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion .ci/sample-static/workspace.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions harness/attributes/common-spa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ attributes.default:
app:
node_web_port: 3000
web_directory: /usr/share/nginx/html
code_owner: node

tasks:
build:
Expand All @@ -11,6 +12,7 @@ attributes.default:
- "= @('app.build') == 'static' ? 'yarn build' : ''"
start_dev:
steps:
- passthru yarn install
- yarn dev

nginx:
Expand Down
2 changes: 2 additions & 0 deletions harness/attributes/docker-spa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ attributes.default:
memory: 64Mi
console:
enabled: = @('app.build') == 'dynamic'
build:
from: = 'node:' ~ @('node.version') ~ '-slim'
publish: false

pipeline:
Expand Down
2 changes: 1 addition & 1 deletion harness/config/confd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down

0 comments on commit a6386f5

Please sign in to comment.