Deploying from your computer
If you build sites on your own computer, one command puts them on a Linux server over ssh:
sophia deploy root@server --domain example.com --tls-email you@example.com --with-data --site my-site
It needs an ssh key for the server, systemd there, and root or passwordless sudo. The first run installs, and every run after that updates, the same way the server installer does: its own account, a sandboxed service on 127.0.0.1, nginx or Caddy in front, and HTTPS.
What each option does
| Option | What it does |
|---|---|
--domain | Names to serve, set up in nginx or Caddy. |
--site <slug> | The site that answers on those names. Its public address is set to match. |
--with-data | Copy this install's content, pictures and accounts. Passwords travel too, so change any starter password once it is live. |
--replace-data | Overwrite content already on the server. The old folder is kept beside it. |
--status | Show the version in use, whether the service runs and whether it answers. |
--rollback | Go back to the earlier program. Content is left as it is. |
--port, --key | The ssh port and key file. |
--binary | The Linux program to send, if not dist-linux/sophia. |
How an update protects the site
The service stops, the database is copied, the new version takes over, and the deploy waits for /healthz to answer. If it does not answer within 30 seconds, the previous version and the database copy come back by themselves. Three versions and three database copies are kept.
Building the Linux program
Developers working from the source run scripts/build-linux.ps1 on Windows. It makes a fully static Linux program that runs on any 64-bit Linux without extra libraries. sophia bundle packs that program with your built extensions, and sophia release writes a signed download folder like the one this site serves.