A compose file
The smallest app is a directory. This one has a compose file and one page. Create these files on home01. Create the parent directories as you go.
services: nginx: image: nginx:1.27-alpine expose: - "80" volumes: - ./site:/usr/share/nginx/html:ro<!doctype html><title>hello</title><p>Hello from SHC.</p>$ shc install ~/learn/nginx -s web --expose 18080=nginx:80installing deployment "web"[web] Healthy 1/1✔ nginx healthy✔ installed deployment "web"exposure: lan$ shc lsSTACK TENANT ENV APP STATUS NODEweb prod prod /root/learn/nginx running home01The deployment is named web. Port 18080 on the node forwards to port 80
of its nginx service. The directory is the app; web is its installed name.
Run the curl command again if the published port is not answering yet.
$ curl -s http://localhost:18080/<!doctype html><title>hello</title><p>Hello from SHC.</p>A compose service can name profiles:. It then runs only when the
deployment names one of them; a service that names none always runs.
--profile names them at install, and shc update --profile replaces them
on a running deployment.
$ shc install ~/learn/nginx -s web --expose 18080=nginx:80 --profile debug$ shc update web --profile debugKeep web installed for now.
Read Underneath the nginx deployment before going on; it reads what this page left running.
Next: A simple Postgres.
shc@docs:~$