03.12.2015 Views

laravel4cookbook

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Deployment 102<br />

26 return new Watcher($tracker, $app['files']);<br />

27 });<br />

28 }<br />

29<br />

30 /**<br />

31 * Get the services provided by the provider.<br />

32 *<br />

33 * @return array<br />

34 */<br />

35 public function provides()<br />

36 {<br />

37 return array('watcher');<br />

38 }<br />

39 }<br />

This file should be saved as vendor/jasonlewis/resource-watcher/src/JasonLewis/ResourceWatcher/Integration/Lar<br />

.<br />

Rsync<br />

Rsync is a file synchronisation utility which we will use to synchronise our distribution folder to a<br />

remote server. It requires a valid private/public key and some configuration.<br />

To set up SSH access, for your domain, follow these steps:<br />

1. Back up any keys you already have in ∼/.ssh<br />

2. Generate a new key with: ssh-keygen -t rsa -C “your_email@example.com”<br />

3. Remember the name you set here.<br />

4. Copy the contents of the new public key file (the name from step 3, ending in .pub).<br />

5. SSH into your remove server.<br />

6. Add the contents of the new public key file (which you copied in step 3) to ∼/.ssh/authorized_-<br />

keys. Add the following lines to ∼/.ssh/config (on your local machine):<br />

1 host example.com<br />

2 User your_user<br />

3 IdentityFile your_key_file

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!