Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Update API to enable connection re-use, allow streaming… #138

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,19 @@ repeatable way, e.g. in the context of deployment tools:
hosts = ["1.eg.io", {"2.eg.io", port: 2222}]

context =
SSHKit.context(hosts)
SSHKit.context()
|> SSHKit.path("/var/www/phx")
|> SSHKit.user("deploy")
|> SSHKit.group("deploy")
|> SSHKit.umask("022")
|> SSHKit.env(%{"NODE_ENV" => "production"})

:ok = SSHKit.upload(context, ".", recursive: true)
:ok = SSHKit.run(context, "yarn install")
{:ok, conn} = SSHKit.connect(hosts)

{:ok, conn} = SSHKit.upload(conn, context, ".", recursive: true)
pmeinhardt marked this conversation as resolved.
Show resolved Hide resolved
{:ok, conn} = SSHKit.run(conn, context, "yarn install")

{:ok, _} = SSHKit.close(conn)
```

The [`SSHKit`](https://hexdocs.pm/sshkit/SSHKit.html) module documentation has
Expand Down