8000 exclude directories (#26) · sksmta/deploy-code-server@07dfe8c · GitHub
[go: up one dir, main page]

Skip to content

Commit 07dfe8c

Browse files
authored
exclude directories (coder#26)
1 parent 1973128 commit 07dfe8c

File tree

3 files changed

+11
-29
lines changed

3 files changed

+11
-29
lines changed

deploy-container/README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ COPY deploy-container/myTool /home/coder/myTool
3838
| `USE_LINK` | Use code-server --link instead of a password (coming soon) | false |
3939
| `GIT_REPO` | A git repository to clone | |
4040
| `START_DIR` | The directory code-server opens (and clones repos in) | /home/coder/project |
41-
| `DOTFILES_REPO` | GitHub path to a dotfiles repository with your personal configuration across devices. | |
4241
---
4342

4443
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.
@@ -70,12 +69,7 @@ Now, you can add the following the environment variables in the code-server clou
7069
| RCLONE_REMOTE_NAME | the name of the remote you added in step 2.<br />check with `$ rclone listremotes` | code-server-remote | |
7170
| RCLONE_SOURCE | source directory to sync files in the code-server container | the project directory: `/home/coder/project` | |
7271
| 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 | |
73-
| RCLONE_VSCODE_TASKS | import push and pull shortcuts into VS Code
74-
75-
![rclone screenshot from VS Code](../img/rclone-vscode-tasks.png)
76-
77-
| true |
78-
72+
| RCLONE_VSCODE_TASKS | import push and pull shortcuts into VS Code ![rclone screenshot from VS Code](../img/rclone-vscode-tasks.png) | true |
7973
| RCLONE_AUTO_PUSH | automatically push files on startup if the rclone remote is empty (environment -> rclone remote) | true | |
8074
| RCLONE_AUTO_PULL | automatically pull files on startup if the rclone remote is not empty (rclone -> environment remote) | true | |
8175
| RCLONE_FLAGS | additional flags to attach to the push and pull script.<br />type `$ rclone help flags` for a list. | | |
@@ -92,6 +86,14 @@ $ sh /home/coder/pull_remote.sh # get latest files from the remote
9286
# use items in bottom bar or ctrl + P, run task: push_remote or pull_remote or
9387
```
9488

89+
### Popular rclone flags
90+
91+
To avoid syncing unnecessary directories, add this to `RCLONE_FLAGS` :
92+
93+
``` none
94+
--exclude "node_modules/**" --exclude ".git/**"
95+
```
96+
9597
---
9698

9799
## Todo

deploy-container/entrypoint.sh

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -76,26 +76,6 @@ else
7676

7777
fi
7878

79-
# Extract the user's dotfiles, if they exist
80-
if [[ -z "${DOTFILES_REPO}" ]]; then
81-
echo "[$PREFIX] DOTFILES_REPO is not specified"
82-
else
83-
echo "[$PREFIX] DOTFILES_REPO is specified"
84-
git clone $DOTFILES_REPO /home/coder/dotfiles
85-
86-
# Symlink if install.sh doesn't exist.
87-
# If it exits, run it
88-
if [ -f "/home/coder/dotfiles/install.sh" ]; then
89-
echo "[$PREFIX] install.sh exists, running it..."
90-
/bin/sh /home/coder/dotfiles/install.sh
91-
else
92-
echo "[$PREFIX] install.sh does not exist, symlinking dotfiles..."
93-
ln -sv /home/coder/dotfiles/* ~/
94-
fi
95-
96-
97-
fi
98-
9979
echo "[$PREFIX] Starting code-server..."
10080
# Now we can run code-server with the default entrypoint
10181
/usr/bin/entrypoint.sh --bind-addr 0.0.0.0:8080 $START_DIR

guides/railway.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Use Railway + code-server to get a dev environment that you can access from any
88

99
## Step 1: Click button to deploy
1010

11-
[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/new?template=https%3A%2F%2Fgithub.com%2Fcdr%2Fdeploy-code-server%2F&envs=PASSWORD%2CGIT_REPO%2CDOTFILES_REPO&optionalEnvs=GIT_REPO%2CDOTFILES_REPO&PASSWORDDesc=Your+password+to+log+in+to+code-server+with&GIT_REPODesc=A+git+repo+to+clone+and+open+in+code-server+(ex.+https%3A%2F%2Fgithub.com%2Fcdr%2Fdocs.git)&DOTFILES_REPODesc=Environment+configuration+not+related+to+this+specific+environment.+(see+https%3A%2F%2Fdotfiles.github.io%2F))
11+
[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/new?template=https%3A%2F%2Fgithub.com%2Fcdr%2Fdeploy-code-server&envs=PASSWORD%2CGIT_REPO&PASSWORDDesc=Your+password+to+log+in+to+code-server+with&GIT_REPODesc=A+git+repo+to+clone+and+open+in+code-server+%28ex.+https%3A%2F%2Fgithub.com%2Fcdr%2Fdocs.git%29)
1212

1313
## Step 2: Configure & launch your environment
1414

@@ -27,7 +27,7 @@ You also need to specity a `PASSWORD` and a `GIT_REPO` to clone in your environm
2727
1. Open the source repo in GitHub and edit the `Dockerfile`
2828
1. Add some custom tools (like NodeJS) and push to the main branch:
2929

30-
``` Dockerfile
30+
```Dockerfile
3131
# You can add custom software and dependencies for your environment here. Some examples:
3232

3333
# RUN code-server --install-extension esbenp.prettier-vscode

0 commit comments

Comments
 (0)
0