File tree 3 files changed +29
-8
lines changed
3 files changed +29
-8
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ A collection of one-click buttons and scripts for deploying [code-server](https:
4
4
5
5
| | Name | Type | Lowest-Price Plan | Deploy |
6
6
| --------------------------------------------------------------------------------------------------------------- | ----------------- | ------------- | ----------------------------- | ------------------------------------------------------- |
7
- | [ ![ AWS EC2] ( img/logo/aws-ec2.png )] ( https://digitalocean. com ) | AWS EC2 | VM | Free Tier, 1 CPU, 1 GB RAM | [ see guide] ( guides/aws-ec2.md ) |
7
+ | [ ![ AWS EC2] ( img/logo/aws-ec2.png )] ( https://aws.amazon. com/ec2 ) | AWS EC2 | VM | Free Tier, 1 CPU, 1 GB RAM | [ see guide] ( guides/aws-ec2.md ) |
8
8
| [ ![ DigitalOcean] ( img/logo/digitalocean.png )] ( https://digitalocean.com ) | DigitalOcean | VM | $5/mo, 1 CPU, 1 GB RAM | [ see guide] ( guides/digitalocean.md ) |
9
9
| [ ![ Vultr] ( img/logo/vultr.png )] ( https://vultr.com ) | Vultr | VM | $3.50/mo, 1 CPU, 512 MB RAM | coming soon |
10
10
| [ ![ Linode] ( img/logo/linode.png )] ( https://linode.com ) | Linode | VM | $5/mo, 1 CPU, 1 GB RAM | [ see guide] ( guides/linode.md ) |
Original file line number Diff line number Diff line change @@ -42,13 +42,15 @@ COPY deploy-container/myTool /home/coder/myTool
42
42
43
43
## Environment variables
44
44
45
- | Variable Name | Description | Default Value |
46
- | ----------------- | ------------------------------------------------------------------------------------------------ | ------------------- |
47
- | ` PASSWORD ` | Password for code-server | |
48
- | ` HASHED_PASSWORD ` | Overrrides PASSWORD. [ SHA-256 hash] ( https://xorbin.com/tools/sha256-hash-calculator ) of password |
49
- | ` USE_LINK ` | Use code-server --link instead of a password (coming soon) | false |
50
- | ` GIT_REPO ` | A git repository to clone | |
51
- | ` START_DIR ` | The directory code-server opens (and clones repos in) | /home/coder/project |
45
+ | Variable Name | Description | Default Value |
46
+ | ------------------ | -------------------------------------------------------------------------------------------------- | ------------------- |
47
+ | ` PASSWORD ` | Password for code-server | |
48
+ | ` HASHED_PASSWORD ` | Overrrides PASSWORD. [ SHA-256 hash] ( https://xorbin.com/tools/sha256-hash-calculator ) of password |
49
+ | ` USE_LINK ` | Use code-server --link instead of a password (coming soon) | false |
50
+ | ` GIT_REPO ` | A git repository to clone | |
51
+ | ` DOTFILES_REPO ` | A [ dotfiles] ( https://dotfiles.github.io/ ) repo to save preferences. Runs install.sh, if it exists. | |
52
+ | ` DOTFILES_SYMLINK ` | Symlinks dotfiles repo to $HOME, if exits. | true |
53
+ | ` START_DIR ` | The directory code-server opens (and clones repos in) | /home/coder/project |
52
54
53
55
---
54
56
Original file line number Diff line number Diff line change 76
76
77
77
fi
78
78
79
+ # Add dotfiles, if set
80
+ if [ -n " $DOTFILES_REPO " ]; then
81
+ # grab the files from the remote instead of running project_init()
82
+ echo " [$PREFIX ] Cloning dotfiles..."
83
+ mkdir -p $HOME /dotfiles
84
+ git clone $DOTFILES_REPO $HOME /dotfiles
85
+
86
+ DOTFILES_SYMLINK=" ${RCLONE_AUTO_PULL:- true} "
87
+
88
+ # symlink repo to $HOME
89
+ if [ $DOTFILES_SYMLINK = " true" ]; then
90
+ shopt -s dotglob
91
+ ln -sf source_file $HOME /dotfiles/* $HOME
92
+ fi
93
+
94
+ # run install script, if it exists
95
+ [ -f " $HOME /dotfiles/install.sh" ] && $HOME /dotfiles/install.sh
96
+ fi
97
+
79
98
echo " [$PREFIX ] Starting code-server..."
80
99
# Now we can run code-server with the default entrypoint
81
100
/usr/bin/entrypoint.sh --bind-addr 0.0.0.0:8080 $START_DIR
You can’t perform that action at this time.
0 commit comments