Skip to content

Commit 668dddc

Browse files
committed
Move Examples to Snippets and Update Inputs
1 parent 05772e7 commit 668dddc

File tree

13 files changed

+304
-257
lines changed

13 files changed

+304
-257
lines changed

docs/docs/inputs.md

Lines changed: 53 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,16 @@ Example: `cool-stack`
4242

4343
### file
4444

45-
Stack file or Compose file(s).
45+
Stack file or Compose file(s). _Swarm_ only supports 1 file per stack.
4646

47-
_Compose._ Multiple files can be provided, space seperated.
48-
This will prepend the `-f` flag to each file.
47+
_Compose._ [Multiple files](https://docs.docker.com/compose/how-tos/multiple-compose-files/) can be provided, space seperated. and the `-f` flag will be prepended to each file.
4948

50-
Example: `web.yaml db.yaml`
49+
Example: `web.yaml db.yaml`
50+
Output: `-f web.yaml -f db.yaml`
5151

5252
### mode
5353

54-
**Compose Only.** Set this to `compose` to use `compose up` instead of `stack deploy` for non-swarm hosts.
54+
**Compose Only.** Set this to `compose` to use [compose up](https://docs.docker.com/reference/cli/docker/compose/up/) instead of [stack deploy](https://docs.docker.com/reference/cli/docker/stack/deploy/) for non-swarm hosts.
5555

5656
### args
5757

@@ -60,18 +60,62 @@ The `detach` flag defaults to false for compose. With no args the default is `--
6060
Use an empty string to override. For more details, see the compose
6161
[docs](https://docs.docker.com/reference/cli/docker/compose/up/).
6262

63+
Example: `--remove-orphans --force-recreate`
64+
6365
### host
6466

6567
The hostname or IP address of the remote docker server to deploy too.
6668
If your hostname is behind a proxy like Cloudflare you will need to use the IP address.
6769

70+
If you don't know your Public IP, you may be able to find it using one of these commands.
71+
72+
::: code-group
73+
74+
```shell [curl ~vscode-icons:file-type-shell~]
75+
curl ip.me
76+
```
77+
78+
```shell [curl -4 ~vscode-icons:file-type-shell~]
79+
curl -4 ifconfig.co
80+
```
81+
82+
```shell [wget ~vscode-icons:file-type-shell~]
83+
echo $(wget -qO- https://ipecho.net/plain)
84+
```
85+
86+
```shell [dig ~vscode-icons:file-type-shell~]
87+
dig TXT +short o-o.myaddr.l.google.com @ns1.google.com
88+
```
89+
90+
:::
91+
6892
### pass/ssh_key
6993

7094
You must provide either a `pass` or `ssh_key`, but **not** both.
7195

96+
When using a password, a temporary key is generated using [ssh-keygen](https://linux.die.net/man/1/ssh-copy-id)
97+
and copied to the host using [ssh-copy-id](https://linux.die.net/man/1/ssh-copy-id).
98+
The authorized_keys file is [cleaned up](https://github.com/cssnr/stack-deploy-action/blob/master/src/main.sh#L10) after each deploy.
99+
100+
To generate an SSH run the following as the `user` you are using:
101+
102+
::: code-group
103+
104+
```shell [rsa ~vscode-icons:file-type-shell~]
105+
ssh-keygen -f ~/.ssh/id_rsa -N ""
106+
cat ~/.ssh/id_rsa
107+
```
108+
109+
```shell [ed25519 ~vscode-icons:file-type-shell~]
110+
ssh-keygen -f ~/.ssh/id_ed25519 -N ""
111+
cat ~/.ssh/id_ed25519
112+
```
113+
114+
:::
115+
72116
### disable_keyscan
73117

74-
This will disable the `ssh-keyscan` command. Advanced use only.
118+
This will disable the [ssh-keyscan](https://linux.die.net/man/1/ssh-keyscan) command. **Advanced usage only.**
75119

76120
### env_file
77121

@@ -99,17 +143,17 @@ Defaults to `false` in `mode: compose`.
99143

100144
**Swarm Only.** Set to `true` to deploy with `--with-registry-auth`.
101145

102-
If setting `registry_user/registry_pass` this is implied.
146+
If setting `registry_user`/`registry_pass` this is implied.
103147

104148
### registry_host
105149

106-
To run `docker login` on another registry.
150+
To run [docker login](https://docs.docker.com/reference/cli/docker/login/) on another registry.
107151

108152
Example: `ghcr.io`
109153

110154
### registry_user/registry_pass
111155

112-
Required to run `docker login` before stack deploy.
156+
Required to run [docker login](https://docs.docker.com/reference/cli/docker/login/) before stack deploy.
113157

114158
### summary
115159

0 commit comments

Comments
 (0)