blob: 06db78b1bb32cc8635944c9f5907bcd0b88db949 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<h1 id="vagrant-push"> Vagrant Push </h1> <h2 id="ftp-amp-sftp-strategy"> FTP & SFTP Strategy </h2> <p>Vagrant Push FTP and SFTP strategy pushes the code in your Vagrant development environment to a remote FTP or SFTP server.</p> <p>The Vagrant Push FTP And SFTP strategy supports the following configuration options:</p> <ul> <li>
<p><a href="#host"><code>host</code></a> - The address of the remote (S)FTP server. If the (S)FTP server is running on a non-standard port, you can specify the port after the address (<code>host:port</code>).</p> </li> <li>
<p><a href="#username"><code>username</code></a> - The username to use for authentication with the (S)FTP server.</p> </li> <li>
<p><a href="#password"><code>password</code></a> - The password to use for authentication with the (S)FTP server.</p> </li> <li>
<p><a href="#passive"><code>passive</code></a> - Use passive FTP (default is true).</p> </li> <li>
<p><a href="#secure"><code>secure</code></a> - Use secure (SFTP) (default is false).</p> </li> <li>
<p><a href="#destination"><code>destination</code></a> - The root destination on the target system to sync the files (default is <code>/</code>).</p> </li> <li>
<p><a href="#exclude"><code>exclude</code></a> - Add a file or file pattern to exclude from the upload, relative to the <code>dir</code>. This value may be specified multiple times and is additive. <code>exclude</code> take precedence over <code>include</code> values.</p> </li> <li>
<p><a href="#include"><code>include</code></a> - Add a file or file pattern to include in the upload, relative to the <code>dir</code>. This value may be specified multiple times and is additive.</p> </li> <li>
<p><a href="#dir"><code>dir</code></a> - The base directory containing the files to upload. By default this is the same directory as the Vagrantfile, but you can specify this if you have a <code>src</code> folder or <code>bin</code> folder or some other folder you want to upload.</p> </li> </ul> <h3 id="usage"> Usage </h3> <p>The Vagrant Push FTP and SFTP strategy is defined in the <code>Vagrantfile</code> using the <code>ftp</code> key:</p> <div class="highlight"><pre class="highlight ruby" data-language="ruby">config.push.define "ftp" do |push|
push.host = "ftp.company.com"
push.username = "username"
push.password = "password"
end
</pre></div>
<p>And then push the application to the FTP or SFTP server:</p> <div class="highlight"><pre class="highlight shell" data-language="shell">$ vagrant push
</pre></div><div class="_attribution">
<p class="_attribution-p">
© 2010–2018 Mitchell Hashimoto<br>Licensed under the MPL 2.0 License.<br>
<a href="https://www.vagrantup.com/docs/push/ftp.html" class="_attribution-link">https://www.vagrantup.com/docs/push/ftp.html</a>
</p>
</div>
|