Enhanced docs for multideploy

master
tomo 2025-03-27 19:27:26 +01:00
parent 6c1ef0557d
commit d1c18011cc
1 changed files with 18 additions and 16 deletions

@ -1123,7 +1123,7 @@ Although these notes only mention Unleashed, the deploy hook also supports Rucku
## 36. Deploying to multiple services with the same hooks
Multideploy allows you to simultaneously deploy your certificates to multiple services, even those that use the same hook. To be able to use this hook, issue a cert and create a new file `multideploy.yaml` in the directory of the certificate. This must contain a version, the services for which your certificate is to be deployed and configurations that specify which services are to be used. Configurations allow you to group services, which makes it easier to deploy your certificate at once.
Multideploy allows you to deploy your certificates to multiple services, even those that use the same hook. To use this hook, issue a cert and create a new file, `multideploy.yml,` in the certificate directory. This must contain a version and the services to which your certificate will be deployed. All services specified will be used to deploy your certificate!
### Compatibility
| **acme.sh version** | **multideploy version** | **Pull request status** |
@ -1141,11 +1141,6 @@ Multideploy allows you to simultaneously deploy your certificates to multiple se
```yaml
version: 1.0
configs:
- name: "default"
services:
- "YOUR_SERVICE"
services:
- name: "YOUR_SERVICE"
hook: "YOUR_HOOK"
@ -1160,13 +1155,6 @@ services:
# check your acme.sh version in wiki!
version: 1.0
configs:
- name: "default"
services:
- "traefik"
- "adguardhome"
- "technitium-dns"
services:
- name: "traefik"
hook: "docker"
@ -1187,15 +1175,29 @@ services:
environment:
- DEPLOY_DOCKER_CONTAINER_LABEL: "sh.acme.autoload.service=dns02"
- DEPLOY_DOCKER_CONTAINER_PFX_FILE: "/etc/dns/certs/$DOMAIN_DIR.pfx"
- name: "router01"
hook: "routeros"
environment:
- ROUTER_OS_USERNAME: "certuser"
- ROUTER_OS_HOST: "router.example.com"
- ROUTER_OS_PORT: "22"
- name: "nas01"
hook: "synology_dsm"
environment:
- SYNO_SCHEME: "http"
- SYNO_HOSTNAME: "localhost"
- SYNO_PORT: "5000"
- SYNO_CREATE: "1"
- SYNO_CERTIFICATE: "PROD-$_cdomain"
```
`$DOMAIN_DIR` is a provided variable that contains the name of the directory your certificate was created in. You can use this while deploying your certificate to services. This is helpful if you deploy more than one certificate to the same service.
The Configuration `default` should always exist! If you want to have multiple configurations, you can specify which to use with `MULTIDEPLOY_CONFIG`.
If you want to use a filename other than `multideploy.yml`, you can specify it with `MULTIDEPLOY_FILENAME`.
```sh
export MULTIDEPLOY_CONFIG="default"
export MULTIDEPLOY_FILENAME="deploy.yaml"
acme.sh --deploy -d example.com --deploy-hook multideploy
```
If no config is exported, the hook will always look for the config `default`!
If no filename is exported, the hook will always look for the config `multideploy.yml`!
### Bug reporting / feature request
Create a new issue and mention @tomo2403 to get help. Currently, there is no other contributor for this hook.