You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Other code-server environment variables (such as `CODE_SERVER_CONFIG` ) can also be used. See the [code-server FAQ](https://github.com/cdr/code-server/blob/main/docs/FAQ.md) for details.
Expand All
@@ -48,7 +51,7 @@ This image has built-in support for [rclone](https://rclone.org/) so that your f
You can generate the rclone config on any machine, but it works great on the code-server environment itself, or Google Cloud Shell :)
```sh
```sh
# 1. install rclone
# see https://rclone.org/install/ for other install options
$ curl https://rclone.org/install.sh | sudo bash
Expand All
@@ -65,16 +68,16 @@ Now, you can add the following the environment variables in the code-server clou
| RCLONE_DATA | the encoded rclone config you copied in step 3 | n/a | ✅|
| RCLONE_REMOTE_NAME | the name of the remote you added in step 2.<br />check with `$ rclone listremotes` | code-server-remote | |
| RCLONE_DATA | the encoded rclone config you copied in step 3 | n/a | ✅ |
| RCLONE_REMOTE_NAME | the name of the remote you added in step 2.<br />check with `$ rclone listremotes`| code-server-remote | |
| RCLONE_SOURCE | source directory to sync files in the code-server container | the project directory: `/home/coder/project` | |
| RCLONE_DESTINATION | the path in the remote that rclone syncs to. change this if you have multiple code-server environments, or if you want to better organize your files. | code-server-files | |
| RCLONE_VSCODE_TASKS | import push and pull shortcuts into VS Code  | true |
| RCLONE_VSCODE_TASKS | import push and pull shortcuts into VS Code | true |
| RCLONE_AUTO_PUSH | automatically push files on startup if the rclone remote is empty (environment -> rclone remote) | true | |
| RCLONE_AUTO_PULL | automatically pull files on startup if the rclone remote is not empty (rclone -> environment remote) | true | |
| RCLONE_FLAGS | additional flags to attach to the push and pull script.<br />type `$ rclone help flags` for a list.| | |
| RCLONE_FLAGS | additional flags to attach to the push and pull script.<br />type `$ rclone help flags` for a list. | | |
```sh
```sh
# --- How to use ---
Expand All
@@ -83,23 +86,23 @@ $ sh /home/coder/push_remote.sh # save your uncomitted files to the remote
$ sh /home/coder/pull_remote.sh # get latest files from the remote
# In VS Code:
# use items in bottom bar or ctrl + P, run task: push_remote or pull_remote or
# use items in bottom bar or ctrl + P, run task: push_remote or pull_remote or
```
### Popular rclone flags
To avoid syncing unnecessary directories, add this to `RCLONE_FLAGS` :
```none
```none
--exclude "node_modules/**" --exclude ".git/**"
```
---
## Todo
* [ ] Make `push_remote` and `pull_remote` commands in path
* [ ] Impliment file watcher or auto file sync in VS Code
* [ ] Attach a "push" on a git stash??
* [ ] Add support for SSH / VS Code remote access
* [ ] Make rclone logs visible in environment for debugging
- [ ] Make `push_remote` and `pull_remote` commands in path
- [ ] Impliment file watcher or auto file sync in VS Code
- [ ] Attach a "push" on a git stash??
- [ ] Add support for SSH / VS Code remote access
- [ ] Make rclone logs visible in environment for debugging
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.