cloud_sync Remote Development — Live Deploy ke VPS
Fitur ini menyinkronkan file lokal ke VPS secara otomatis setiap kali ada perubahan. Tidak perlu upload manual.
1. Setup Server (pertama kali)
Klik kanan folder workspace di Discovery → Remote Development → Setup Server
File konfigurasi <nama-folder>.deploy.json dibuat otomatis dan langsung dibuka di editor.
Isi field yang diperlukan:
{
"protocol": "ssh",
"host": "xxx.xxx.xxx.xxx",
"user": "",
"port": 22,
"password": "password-server",
"sshKey": "",
"remotePath": "/home/public_html",
"watchDebounce": 800,
"watchIgnore": ".git,node_modules,.env,cache,*.log,.DS_Store,Thumbs.db"
}
| Field | Keterangan |
|---|---|
host | IP atau domain server |
user | Username SSH |
port | Port SSH (default 22) |
password | Password SSH — isi jika tidak pakai key |
sshKey | Path private key SSH — isi jika pakai key, kosongkan jika pakai password |
remotePath | Folder tujuan di server (path absolut) |
watchDebounce | Jeda (ms) sebelum deploy setelah file berubah |
watchIgnore | File/folder yang diabaikan, dipisah koma |
Simpan file (Ctrl+S) setelah selesai mengisi.
2. Run Server
Klik kanan folder → Remote Development → Run Server
- Koneksi SSH diuji otomatis
- Dot hijau muncul di sebelah nama folder → berhasil, file sync aktif
- Dot merah muncul → gagal, periksa kembali konfigurasi
3. Stop Server
Klik kanan → Remote Development → Stop Server
Dot hilang, sinkronisasi berhenti.
4. Edit Config
Klik kanan → Remote Development → Edit Config
Membuka kembali file .deploy.json untuk diedit.
5. Delete Config
Klik kanan → Remote Development → Delete Config
Menghapus file config. Jika server sedang aktif, otomatis dihentikan dulu.
Indikator Badge
| Badge | Arti |
|---|---|
| Dot hijau berkedip | Server aktif, koneksi OK, file sync berjalan |
| Dot merah berkedip | Koneksi gagal saat Run Server diklik |
| Tidak ada badge | Server tidak aktif / belum dijalankan |
Hover badge → tooltip menampilkan user@host:remotePath.
Cara Kerja Sinkronisasi
Jalur A — Simpan dari editor Discovery (Ctrl+S)
File langsung di-upload ke remote via SFTP.
Jalur B — Perubahan dari luar editor
File baru, file diedit dari terminal, AI agent, Windows Explorer, atau copy-paste — semua dipantau otomatis dan di-upload ke remote.
Yang tidak ter-sync:
- File yang dihapus di lokal tidak ikut dihapus di remote
- File di dalam daftar
watchIgnore