Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
aerni authored Mar 30, 2024
1 parent e5471c4 commit f8144f7
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Laravel Sync
This package provides a git-like artisan command to easily sync files and folders between environments. This is super useful for assets, documents, and any other files that are untracked in your git repository.

Laravel Sync is a no-brainer and will soon become best friends with your deploy script. The days are over when you had to manually keep track of files and folders between your environments. Do yourself a favor and give it a try!
Laravel Sync is a no-brainer and the perfect companion for your deploy script. The days are over when you had to manually keep track of files and folders between your environments. Do yourself a favor and give it a try!

## Requirements
- `rsync` on both your source and destination machine
Expand Down Expand Up @@ -78,11 +78,7 @@ return [
*/

'options' => [
// '--archive',
// '--itemize-changes',
// '--verbose',
// '--human-readable',
// '--progress'
'--archive',
],

];
Expand All @@ -92,15 +88,15 @@ return [
To use this package, you have to define at least one remote and recipe.

### Remotes
Each remote consists of a a `user`, a `host` and a `root`. Optionally, you may also define the SSH `port` and define if the remote should be `read_only`.
Each remote consists of a `user`, `host`, and `root`. Optionally, you may also define the SSH `port` and make a remote `read_only`.

| Key | Description |
| ----------- | ---------------------------------------------- |
| `user` | The username to log in to the host |
| `host` | The IP address of your server. |
| `port` | The SSH port to use for this connection |
| `root` | The absolute path to the project's root folder |
| `read_only` | Set to `true` to make the remote read only |
| `read_only` | Set to `true` to make the remote read-only |

```php
'remotes' => [
Expand Down Expand Up @@ -134,7 +130,6 @@ Configure the default rsync options to use when performing a sync. You can overr
```php
'options' => [
'--archive',
'--progress'
],
```

Expand Down Expand Up @@ -168,10 +163,11 @@ You have three commands at your disposal:
### Available Options
You may use the following options:

| Option | Description |
| --------------------- | ---------------------------------- |
| `-O*` or `--option=*` | Override the default rsync options |
| `-D` or `--dry` | Perform a dry run of the sync |
| Option | Description |
| --------------------- | --------------------------------------------------------- |
| `-O*` or `--option=*` | Override the default rsync options |
| `-D` or `--dry` | Perform a dry run of the sync with real-time output |
| `-v` or `--verbose` | Displays the real-time output of the sync in the terminal |

## Usage Examples

Expand All @@ -185,11 +181,16 @@ Push the assets recipe to the production remote with some custom rsync options:
php artisan sync push production assets --option=-avh --option=--delete
```

Perform a dry sync:
Perform a dry run:
```bash
php artisan sync pull staging assets --dry
```

Echo the real-time output of the sync in your terminal:
```bash
php artisan sync pull staging assets --verbose
```

List the origin, target, options, and port in a nice table:
```bash
php artisan sync:list pull staging assets
Expand Down

0 comments on commit f8144f7

Please sign in to comment.