forked from Fediversity/Fediversity
23 lines
563 B
Markdown
23 lines
563 B
Markdown
# service deployment
|
|
|
|
## usage
|
|
|
|
### updating TF modules
|
|
|
|
```sh
|
|
$ npins update terraform-nixos
|
|
$ cd launch/
|
|
$ echo "{\"terraform-nixos\": $(nix-instantiate --eval --json -E '(import ../npins).terraform-nixos.outPath')}" > module.auto.tfvars.json
|
|
```
|
|
|
|
### local development
|
|
|
|
```sh
|
|
$ nix-shell
|
|
$ eval "$(ssh-agent -s)"
|
|
# set your ssh key, e.g.:
|
|
$ ssh_key="$(readlink -f ~/.ssh/id_ed25519)"
|
|
$ echo "{\"ssh_private_key_file\": \"${ssh_key}\", \"deploy_environment\": {\"SSH_AUTH_SOCK\": \"${SSH_AUTH_SOCK}\"}}" > .auto.tfvars.json
|
|
$ rm -rf .terraform/
|
|
$ tofu init
|
|
```
|