1
0
Fork 0
mirror of https://github.com/archtechx/nix.git synced 2025-12-14 04:14:04 +00:00

Add link to SSH deployments step-by-step guide

This commit is contained in:
Samuel Štancl 2025-08-28 18:15:44 +02:00 committed by GitHub
parent f60cb87572
commit ffa4ebb11a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -107,14 +107,15 @@ The default php-fpm opcache configuration is to cache everything *forever* witho
revalidation. Therefore, make sure to include `sudo systemctl reload phpfpm-${name}` in revalidation. Therefore, make sure to include `sudo systemctl reload phpfpm-${name}` in
your deployment script. your deployment script.
To deploy your app, you can use ssh deployments, rather than webhooks triggering pull hooks To deploy your app, you can use
or other techniques. Since this module creates a new user for each site, this deployment [ssh deployments](https://stancl.substack.com/i/170830424/setting-up-deployments),
technique becomes non-problematic and it's one of the simplest things you can do. Just rather than webhooks triggering pull hooks or other techniques. Since this module
ssh-keygen a private key, make a GitHub Actions job use that on push, and include the creates a new user for each site, this deployment technique becomes non-problematic
public key in the site's `sshKeys` array. Then, to be able to `git pull` the site on the and it's one of the simplest things you can do. Just ssh-keygen a private key, make a
server, add the user's `~/.ssh/id_ed25519.pub` to the repository's deployment keys. The GitHub Actions job use that on push, and include the public key in the site's `sshKeys` array.
ssh key for the user is generated automatically (can be disabled by setting `generateSshKey` Then, to be able to `git pull` the site on the server, add the user's `~/.ssh/id_ed25519.pub`
to false). to the repository's deployment keys. The ssh key for the user is generated automatically
(can be disabled by setting `generateSshKey` to false).
Also, if you're using `ssl` you should put this line into your system config: Also, if you're using `ssl` you should put this line into your system config:
```nix ```nix