Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sagebind/docker-swarm-deploy-action
Deploy a stack to a remote Docker swarm.
https://github.com/sagebind/docker-swarm-deploy-action
actions github github-actions
Last synced: 13 days ago
JSON representation
Deploy a stack to a remote Docker swarm.
- Host: GitHub
- URL: https://github.com/sagebind/docker-swarm-deploy-action
- Owner: sagebind
- License: mit
- Archived: true
- Created: 2019-01-20T01:24:16.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-06T05:26:55.000Z (almost 5 years ago)
- Last Synced: 2024-10-02T13:46:33.299Z (about 1 month ago)
- Topics: actions, github, github-actions
- Language: Shell
- Homepage: https://github.com/marketplace/actions/docker-swarm-deploy
- Size: 15.6 KB
- Stars: 37
- Watchers: 2
- Forks: 32
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Docker Swarm Deploy Action
A [GitHub Action](https://github.com/features/actions) that enables you to publish your app as a [Docker stack](https://docs.docker.com/engine/swarm/stack-deploy/) to a remote Docker swarm.
## Example
Below is a brief example on how the action can be used:
```yaml
- name: Deploy to swarm
uses: sagebind/docker-swarm-deploy-action@v2
with:
remote_host: ssh://[email protected]
ssh_private_key: ${{ secrets.DOCKER_SSH_PRIVATE_KEY }}
ssh_public_key: ${{ secrets.DOCKER_SSH_PUBLIC_KEY }}
args: stack deploy --compose-file stack.yaml coolapp
```If you are deploying any private Docker images, you can use the [Docker Login](https://github.com/marketplace/actions/docker-login) action to first log in to your private registry, and then provide the `--with-registry-auth` flag to `docker stack deploy` to use the logged in credentials during deployment.
## Inputs
Below are all of the supported inputs. Some inputs used to authenticate with your swarm should be kept private, and should be supplied as secrets for security.
### `args`
Arguments to pass to the `docker` command after connecting to the remote swarm.
### `remote_host`
Specifies how to connect to your swarm with a Docker host to connect to, using the same syntax as the Docker [`--host` command line flag](https://docs.docker.com/engine/reference/commandline/cli/). This must be a manager node in your swarm for most operations to work.
### `ssh_public_key`
When connecting to Docker over SSH, this must contain the SSH public key of the server for verification. Optional.
### `ssh_private_key`
When connecting to Docker over SSH, this must contain the SSH private key to use to connect. Optional.
## License
This project is licensed under the MIT license. See the [LICENSE](LICENSE) file for details.