Skip to content
This repository was archived by the owner on Dec 2, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions node-service/content/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion node-service/content/score.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ metadata:
name: node-workload
containers:
node-service:
image: . # Set by pipeline
image: .
variables:
PORT: "3000"
DB_DATABASE: ${resources.db.name}
Expand Down
11 changes: 5 additions & 6 deletions podinfo/content/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 \
Expand Down
14 changes: 5 additions & 9 deletions podinfo/content/score.yaml
Original file line number Diff line number Diff line change
@@ -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