c_pico.sh

· erock's pastes · raw

expires: 2026-04-13

 1# command stays alive as long as the user keeps the terminal session alive
 2ssh c.pico.sh run -p 80:80 --name web nginx:latest
 3# pipe it to us
 4docker save web:latest | ssh c.pico.sh run -p 80:80
 5
 6# point your domain to our http load balancer
 7# activate based on external event
 8ssh c.pico.sh sub http.pico.sh run -d --name web web:latest
 9# tail the logs
10ssh c.pico.sh logs -f web
11
12# wait for a git event to build your site
13ssh c.pico.sh sub git.push.neovimcraft run -d -v /artifacts:/app/public --name neovimcraft_build neovimcraft_build:latest
14# add a git hook to your repo or manually send the event
15echo '{"ref": "2f5dc3e", "commit_msg": "chore: update rfc", "ts": 1768270668}' | ssh c.pico.sh pub git.push.neovimcraft
16
17# fetch the build artifacts directly from container
18rsync -rv c.pico.sh:/neovimcraft_build/artifacts ./public/
19
20# we might also want to figure out how to automatically upload the artifacts to our object storage system and let users tag them or run another job to upload them
21
22# remote into the job
23ssh c.pico.sh zmx neovimcraft_build
24# you now have access to a shell with the entire session history
25# dev tooling automatically installed
26# ability install any tools for debugging
27# pressing up-arrow + enter restarts the failed job
28# the command itself would look something like:
29docker run --rm -v /artifacts:/app/public --name neovimcraft_build neovimcraft_build:latest {docker_cmd}