You need csph signed in, with learn and lab as your defaults (lesson 5.1.1), and room for one Flex spherelet.
Deploy the shop
csph deploy --image quay.io/computesphere/learn-shop-api:1.4.0 \ --name shop-api --port 8080 --no-wait--no-waithands your terminal back instead of waiting for a service that won't start.You should seecsph returns without waiting, and shop-api shows Deploying in the console.
Read the deploy log
Open
shop-api, choose the Logs tab, then Deploy.csph logs shop-api --kind deployRun it again until the restarts appear. The newest event is at the top.
The status can still say Running. A Complete chip on the log means it stopped fetching: reload the page for new events.
You should seewithin a few minutes, Restarting repeatedly: The service is restarting repeatedly.
Find why in the runtime log
Choose Runtime and search for
fatal, or run:csph logs shop-api --search fatalCheck yourself
You should seethe same fatal line, once per crash, ending "missing":"SIGNING_KEY"
Add the secret
In Settings, Environment variables, choose Edit, then the Secrets tab. Add
SIGNING_KEY=demo-not-a-real-key-0000, Save, and choose Save & redeploy.csph services secrets set SIGNING_KEY=demo-not-a-real-key-0000 --service <service-id>This redeploys when the value changes; setting the same value again doesn't.
csph services listshows the service ID.You should seeshop-api shows Running within a few minutes.
Confirm it started
csph logs shop-api --kind deploy csph logs shop-api --search readyYou should seeLive at the top of the deploy log, and "ready: catalog loaded, /healthz answers 200" in the runtime log.
Call it
The URL is on
shop-api's page in the console:curl https://<your-shop-api-url>/healthzKeep
shop-api: later modules use it.You should see{"status":"ok"}
Check your work
If this doesn't pass
The name is case-sensitive, and it belongs on the Secrets tab, not General.
If this doesn't pass
Saved with Save only? Choose Redeploy on shop-api. Still crashing? Search the runtime log for fatal again: a different line means a different cause.
If this doesn't pass
Wait for Running first. If it's Running but doesn't answer, wait a minute and try again.
If this doesn't pass
Read the fatal line in step 3: its missing field names the variable.