-
Notifications
You must be signed in to change notification settings - Fork 645
Add additional documentation #8
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
fc0a12a
Create configuring_environment.md
46b0ef4
Change start dir to default code-server start dir
5afd7a9
Fix spelling
f8a0b6e
Add files via upload
3b71e7b
Update configuring_environment.md
e75424c
Fix formatting
4108ab6
Update configuring_environment.md
77efbf4
Fix formatting
52b7859
Fix formatting yet again
9b90f82
Add files via upload
c36342c
Update configuring_environment.md
c66c76e
Fix spelling
227f5c8
Add link to additional documentation
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Configure code-server and environemnt | ||
### Changing START_DIR in [entrypoint.sh](/deploy-container/entrypoint.sh) or getting Directory '/home/coder/poject' does not exist | ||
If you change the directory and now code-server wont work, or if you are getting errors containg the starting directory that say it doesnt exist, you can add the following command into the Dockerfile to create the starting directory | ||
```Dockerfile | ||
# Create starting directory | ||
# Should be the same as $START_DIR in entrypoint.sh | ||
RUN mkdir /home/coder/files | ||
``` | ||
___ | ||
### Using a config.yaml file for code-server | ||
code-server will automatically generate a configuration file [[Source]](https://github.com/cdr/code-server/blob/main/docs/FAQ.md#how-does-the-config-file-work)<br> | ||
You can create a config.yaml file in the deploy-container directory containing your code-server configuration.<br> | ||
Afterwards, in order for it to be used, you will need to add these Docker commands to the Dockerfile | ||
```Dockerfile | ||
# Create config directory | ||
RUN mkdir /home/coder/.config | ||
|
||
# Copy config file | ||
# The path to the file bing copied should be the same as where you created the config file | ||
COPY deploy-container/config.yaml /home/coder/.config/code-server/config.yaml | ||
``` | ||
Now you can edit entrypoint.sh and change the last line to | ||
```shell | ||
# Now we can run code-server with the default entrypoint | ||
# The path to the config file should be where it was copied to | ||
/usr/bin/entrypoint.sh --config /home/coder/.config/code-server/config.yaml --bind-addr 0.0.0.0:8080 $START_DIR | ||
``` | ||
Or you can set the CODE_SERVER_CONFIG environment variable to the path of your configuration file<br> | ||
For more information about this, see [cdr/code-server/main/docs/FAQ.md](https://github.com/cdr/code-server/blob/main/docs/FAQ.md#how-does-the-config-file-work) | ||
___ | ||
### Changing the default vscode settings that get apllied each time the container is rebuilt | ||
You can simply edit deploy-container/settings.json to your vscode settings. When the container gets rebuilt, they will be copied to the appropriate place and be applied in code-server.<br> | ||
> NOTE: These settings are applied User-wide |
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.
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.
I'm working on adding this as an option so the user doesn't have to do this