Sha256: ec2fc00c7e1b94fbca10e2728b641cc7c68e17d986da27dfbf7d5b4fed48a7a1

Contents?: true

Size: 1.66 KB

Versions: 8

Compression:

Stored size: 1.66 KB

Contents

---
layout: "docs"
page_title: "Vagrant Push"
sidebar_current: "push"
description: |-
  Vagrant Push is a revolutionary feature that allows users to push the code in
  their Vagrant environment to a remote location.
---

# Vagrant Push

As of version 1.7, Vagrant is capable of deploying or "pushing" application code
in the same directory as your Vagrantfile to a remote such as an FTP server or
[HashiCorp's Atlas][Atlas].

Pushes are defined in an application's `Vagrantfile` and are invoked using the
`vagrant push` subcommand. Much like other components of Vagrant, each Vagrant
Push plugin has its own configuration options. Please consult the documentation
for your Vagrant Push plugin for more information. Here is an example Vagrant
Push configuration section in a `Vagrantfile`:

```ruby
config.push.define "ftp" do |push|
  push.host = "ftp.company.com"
  push.username = "..."
  # ...
end
```

When the application is ready to be deployed to the FTP server, just run a
single command:

```shell
$ vagrant push
```

Much like [Vagrant Providers][], Vagrant Push also supports multiple backend
declarations. Consider the common scenario of a staging and QA environment:

```ruby
config.push.define "staging", strategy: "ftp" do |push|
  # ...
end

config.push.define "qa", strategy: "ftp" do |push|
  # ...
end
```

In this scenario, the user must pass the name of the Vagrant Push to the
subcommand:

```shell
$ vagrant push staging
```

Vagrant Push is the easiest way to deploy your application. You can read more
in the documentation links on the sidebar.

[Atlas]: https://atlas.hashicorp.com/  "HashiCorp's Atlas Service"
[Vagrant Providers]: /docs/providers/  "Vagrant Providers"

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
vagrant-aws-mkubenka-0.7.2.pre.14 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-5333e60e2d38/website/source/docs/push/index.html.md
vagrant-aws-mkubenka-0.7.2.pre.11 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-5333e60e2d38/website/source/docs/push/index.html.md
vagrant-aws-mkubenka-0.7.2.pre.10 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-5333e60e2d38/website/source/docs/push/index.html.md
vagrant-aws-mkubenka-0.7.2.pre.9 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-5333e60e2d38/website/source/docs/push/index.html.md
vagrant-compose-yaml-0.1.3 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/website/source/docs/push/index.html.md
vagrant-compose-yaml-0.1.2 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/website/source/docs/push/index.html.md
vagrant-compose-yaml-0.1.1 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/website/source/docs/push/index.html.md
vagrant-compose-yaml-0.1.0 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/website/source/docs/push/index.html.md