diff --git a/node-service/content/Makefile b/node-service/content/Makefile index 2153dd6..ee0c6bf 100644 --- a/node-service/content/Makefile +++ b/node-service/content/Makefile @@ -17,19 +17,17 @@ CONTAINER_IMAGE = ${CONTAINER_NAME}:test .score-compose/state.yaml: score-compose init \ - --no-sample + --no-sample \ + --patch-templates https://raw.githubusercontent.com/score-spec/community-patchers/refs/heads/main/score-compose/unprivileged.tpl compose.yaml: score.yaml .score-compose/state.yaml Makefile score-compose generate score.yaml \ --build '${CONTAINER_NAME}={"context":".","tags":["${CONTAINER_IMAGE}"]}' \ --override-property containers.${CONTAINER_NAME}.variables.MESSAGE="Hello, Compose!" -compose.override.yaml: - echo '{"services":{"${WORKLOAD_NAME}-${CONTAINER_NAME}":{"read_only":"true","user":"65532","cap_drop":["ALL"]}}}' | yq e -P > compose.override.yaml - ## Generate a compose.yaml file from the score spec and launch it. .PHONY: compose-up -compose-up: compose.yaml compose.override.yaml +compose-up: compose.yaml docker compose up --build -d --remove-orphans sleep 5 @@ -45,7 +43,8 @@ compose-down: .score-k8s/state.yaml: score-k8s init \ - --no-sample + --no-sample \ + --patch-templates https://raw.githubusercontent.com/score-spec/community-patchers/refs/heads/main/score-k8s/unprivileged.tpl manifests.yaml: score.yaml .score-k8s/state.yaml Makefile score-k8s generate score.yaml \ diff --git a/node-service/content/score.yaml b/node-service/content/score.yaml index 292f01a..0ad5c42 100644 --- a/node-service/content/score.yaml +++ b/node-service/content/score.yaml @@ -3,7 +3,7 @@ metadata: name: node-workload containers: node-service: - image: . # Set by pipeline + image: . variables: PORT: "3000" DB_DATABASE: ${resources.db.name} diff --git a/podinfo/content/Makefile b/podinfo/content/Makefile index 554fa60..ed8373d 100644 --- a/podinfo/content/Makefile +++ b/podinfo/content/Makefile @@ -17,18 +17,16 @@ CONTAINER_IMAGE = ${CONTAINER_NAME}:test .score-compose/state.yaml: score-compose init \ - --no-sample + --no-sample \ + --patch-templates https://raw.githubusercontent.com/score-spec/community-patchers/refs/heads/main/score-compose/unprivileged.tpl compose.yaml: score.yaml .score-compose/state.yaml Makefile score-compose generate score.yaml \ --build '${CONTAINER_NAME}={"context":".","tags":["${CONTAINER_IMAGE}"]}' -compose.override.yaml: - echo '{"services":{"${WORKLOAD_NAME}-${CONTAINER_NAME}":{"read_only":"true","user":"65532","cap_drop":["ALL"]}}}' | yq e -P > compose.override.yaml - ## Generate a compose.yaml file from the score spec and launch it. .PHONY: compose-up -compose-up: compose.yaml compose.override.yaml +compose-up: compose.yaml docker compose up --build -d --remove-orphans sleep 5 @@ -44,7 +42,8 @@ compose-down: .score-k8s/state.yaml: score-k8s init \ - --no-sample + --no-sample \ + --patch-templates https://raw.githubusercontent.com/score-spec/community-patchers/refs/heads/main/score-k8s/unprivileged.tpl manifests.yaml: score.yaml .score-k8s/state.yaml Makefile score-k8s generate score.yaml \ diff --git a/podinfo/content/score.yaml b/podinfo/content/score.yaml index 0cced2c..f1c0ed0 100644 --- a/podinfo/content/score.yaml +++ b/podinfo/content/score.yaml @@ -1,27 +1,23 @@ apiVersion: score.dev/v1b1 - metadata: name: podinfo-workload - service: ports: www: - port: 80 # The port that the service will be exposed on - targetPort: 9898 # The port that the container will be listening on - + port: 80 + targetPort: 9898 containers: podinfo: - image: . # Set by pipeline + image: . variables: PODINFO_UI_COLOR: "#34577c" PODINFO_UI_MESSAGE: "" - resources: - dns: # We need a DNS record to point to the service + dns: type: dns route: type: route params: host: ${resources.dns.host} path: / - port: 80 + port: 80 \ No newline at end of file