Your own page
This page adds a file of the app: guestbook’s own page, mounted into the
container, so nginx serves your page instead of its welcome page. An app
carries the files its services need beside app.yaml, and every node that
runs it gets a copy.
Write the page on home01, in a directory of the app.
<!doctype html><title>guestbook</title><p>Sign the guestbook.</p>Mount it where nginx looks for pages. ./site is a path in the app’s
directory; :ro mounts it read-only, which SHC requires of a directory of
the app, so a container cannot change the app’s own files.
services: web: image: nginx:1.27-alpine expose: - "80" volumes: - ./site:/usr/share/nginx/html:ro--quiet makes shc validate print nothing and answer with its exit code
alone, which is what a script wants.
$ shc validate ~/learn/guestbook --quietThe deployment runs from the copy of the app SHC took at install, not from
~/learn/guestbook. shc update reads the directory again and starts what
changed. --stack validates the copy a deployment runs, instead of a
directory.
$ shc update guestbook...$ shc validate --stack guestbook...$ curl -sk --resolve guestbook.learn.test:443:127.0.0.1 https://guestbook.learn.test/<!doctype html><title>guestbook</title><p>Sign the guestbook.</p>shc status -s reads one deployment: its services, the node each replica
runs on and its state.
$ shc status -s guestbook...Next: A second service.