-
Notifications
You must be signed in to change notification settings - Fork 643
Containers: Add VS Code tasks and improve overall documentation & flexibility #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 16 commits
6b17676
4a66224
ed0b599
c87abcb
cab263d
e2acb34
4c4fa1a
cd4060f
935800a
8e51dce
0158e89
bfa9c95
e995984
45c63b9
ba36254
b96f1de
1c703a4
28f2ccc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,12 +13,13 @@ Docker Hub: `bencdr/code-server-deploy-container` | |
|
||
## Environment variables: | ||
|
||
| Variable Name | Description | Default Value | | ||
| ------------- | ---------------------------------------------------------- | ------------- | | ||
| `PASSWORD` | Password for code-server | | ||
| `USE_LINK` | Use code-server --link instead of a password (coming soon) | false | | ||
| `GIT_REPO` | A git repository to clone | | | ||
|
||
| Variable Name | Description | Default Value | | ||
| ----------------- | ------------------------------------------------------------------------------------------------ | ------------------- | | ||
| `PASSWORD` | Password for code-server | | | ||
| `HASHED_PASSWORD` | Overrrides PASSWORD. [SHA-256 hash](https://xorbin.com/tools/sha256-hash-calculator) of password | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. added hashed password :) |
||
| `USE_LINK` | Use code-server --link instead of a password (coming soon) | false | | ||
| `GIT_REPO` | A git repository to clone | | | ||
| `START_DIR` | The directory code-server opens (and clones repos in) | /home/coder/project | | ||
--- | ||
|
||
## 💾 Persist your filesystem with `rclone` | ||
|
@@ -44,18 +45,21 @@ Now, you can add the following the environment variables in the code-server clou | |
|
||
| Environment Variable | Description | Default Value | Required | | ||
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------- | -------- | | ||
| RCLONE_DATA | the encoded rclone config you copied in step 3 | n/a | ✅ | | ||
| 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 | | ||
```sh | ||
|
||
# How to use: | ||
# --- How to use --- | ||
|
||
# Terminal: | ||
$ 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: | ||
# ctrl + P, run task: push_remote or pull_remote | ||
Comment on lines
+65
to
+67
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. documented the new tasks |
||
``` | ||
|
||
--- | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "push_remote", | ||
"type": "shell", | ||
"command": "sh /home/coder/push_remote.sh", | ||
"presentation": { | ||
"reveal": "always" | ||
}, | ||
"problemMatcher": [], | ||
"options": { | ||
"statusbar": { | ||
"label": "$(repo-push) rclone: push" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i slightly modified the labels |
||
} | ||
} | ||
}, | ||
{ | ||
"label": "pull_remote", | ||
"type": "shell", | ||
"command": "sh /home/coder/pull_remote.sh", | ||
"presentation": { | ||
"reveal": "always" | ||
}, | ||
"problemMatcher": [], | ||
"options": { | ||
"statusbar": { | ||
"label": "$(repo-pull) rclone: pull" | ||
} | ||
} | ||
} | ||
] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this makes the install extension example work