Configuration
sync-config configuration
project_name : <String>
project_name : <String>
This config for project identity
Example :
project_name: Sample Project
username : <String>
username : <String>
The username for ssh connect to the server
Example :
username: root
privateKey : <String>
privateKey : <String>
Place your private key as an absolute path.
Example :
privateKey: C:\Users\test\.ssh\id_rsa
host : <String>
host : <String>
Fill your host target
Example :
host: 192.168.0.2
port : <String>
port : <String>
Fill the ssh port host target
Example :
port: 22
localPath : <String>
localPath : <String>
Place your local project directory
Example :
localPath : D:\workspace\sample_project
remotePath : <String>
remotePath : <String>
Place your remote project directory
Example :
remotePath : /root/workspaces/sample_project
ignores : <ArrayString>
ignores : <ArrayString>
Select which file or folder you need to ignore to sync.
Example :
ignores :
# if you want ignore folder add “/” for last character
- dist/
- .git/
- node_modules/
# if you want ignore only file
- readme.md
downloads : <ArrayString>
downloads : <ArrayString>
Select which file or folder you need exclusively can be downloaded. This feature is used for two way sync for specific file or folder.
Example :
downloads :
# if you want download folder add "/" for last character
- storage/logs/
- dist/
# if you want download only file
- readme.md
single_sync : <ArrayString>
single_sync : <ArrayString>
Select which file or folder you need exclusively can be downloaded and uploaded manually. This feature is used for simple rsync for specific files or folders.
Example :
single_sync:
- node_modules
- dist
trigger_permission : <ArrayObject>
trigger_permission : <ArrayObject>
This feature is used for managing CUD (Create, Update, Delete) action sync to the server which is allowed or not.
Example :
trigger_permission:
# it mean your delete folder action is not effect on the server
unlink_folder: false
# it mean your delete file action is not effect on the server
unlink: false
change: true
add: true
direct_access : <ArrayObject>
direct_access : <ArrayObject>
This external command that you can use for everyday use when you work. This includes the ssh_config format too that you can use to create ssh connections with proxy.
Example :
direct_access:
config_file: ""
# This config will save to ssh_config file on your ssh folder
ssh_configs:
- Host: sample_project_connection
HostName: =host
User: =username
Port: =port
RequestTty: force
IdentityFile: =privateKey
StrictHostKeyChecking: no
RemoteCommand: cd =remotePath && bash -l
ServerAliveInterval: 300
ServerAliveCountMax: 2
ssh_commands:
# This command for use create folder project on server first
- access_name: Create folder on server
command: ssh -v -o RemoteCommand=none sample_project_connection -t mkdir =remotePath
# This command for enter to the server and go to project folder
- access_name: Enter to Server
command: ssh -v -o RemoteCommand=none sample_project_connection
size_limit : <Number>
size_limit : <Number>
You can limit size sync file upload to the server if more than size_limit is blocked.
Example :
size_limit : 20 # this use Mb unit size
reset_cache: <Boolean>
reset_cache: <Boolean>
Every run ngi-sync devsync the file will store in cache if it gets changed. For comparing the cache file with the new file change similar or not. If similar, the file avoids uploading. You can set false if will not reset cache every run ngi-sync devsync, default is true.
Example :
reset_cache: true
Last updated
Was this helpful?