more docs and guides

This commit is contained in:
Ben
2021-03-04 06:49:12 -05:00
parent 53dd155766
commit bd5bd2a195
12 changed files with 121 additions and 10 deletions

11
guides/digitalocean.md Normal file
View File

@@ -0,0 +1,11 @@
# deploying `code-server` on Linode
[DigitalOcean](https://digitalocean.com) is an developer-friendly platform with cloud servers. Here is the easiest way to launch code-server on Linode.
1. Log into DigitalOcean and create a new Ubuntu 20.10 droplet with any size, in any region
1. Under "Select additional options," check `User data`. This will allow you to specify a script that will run on first boot.
1. Paste in the contents of [launch-code-server.sh](../deploy-vm/launch-code-server-linode.sh) to the textarea.
1. Create your server. Feel free to add SSH keys or other preferences.
1. Once your server starts, you can simply navigate to the IP address and get forwarded to a secure version of code-server, which will be proxied behind your GitHub account. For information on how this works, see [code-server --link](https://github.com/cdr/code-server#cloud-program-%EF%B8%8F).
<img src="../img/digitalocean-launch-code-server.gif" alt="DigitalOcean launch code-server" width="800" />

View File

@@ -1,6 +1,7 @@
# Guide: Launching `code-server` on Heroku
Heroku is a managed app hosting platform. Launch code-server on Heroku to get on-demand dev environments that turn off when you don't need them! 💵
Heroku is a managed app hosting platform.
Launch code-server on Heroku to get on-demand dev environments that turn off when you don't need them! 💵
![code-server and Heroku](../img/heroku-app-create.png)
@@ -13,7 +14,9 @@ Heroku is a managed app hosting platform. Launch code-server on Heroku to get on
## Step 2: Configure & deploy your environment
`App name`: The URL and you can access code-server with
`PASSWORD`: A password you can use to log in
`GIT_REPO`: The HTTPS URL of a git repo you'd like to use in code-server. (optional)
After it has built, you can access it by pressing "View" or "Open app."
@@ -22,6 +25,8 @@ After it has built, you can access it by pressing "View" or "Open app."
<img src="../img/modify-github-template.png" alt="Modify GitHub template" width="600" />
Press the button in the top right of the repo, or or click to [use this template](https://github.com/bpmct/deploy-code-server/generate).
## Step 4: Set up automatic builds with this repo
1. In Heroku, navigate to `Deploy -> Deployment Method"

19
guides/linode.md Normal file
View File

@@ -0,0 +1,19 @@
# deploying `code-server` on Linode
[Linode](https://linode.com) is a developer-friendly platform with cloud servers. Here is the easiest way to launch code-server on Linode.
1. Log in to Linode and go to the "StackScripts" section in the sidebar
<img src="../img/linode-stackscripts-sidebar.png" alt="Linode StackScripts" width="450" />
1. Navigate to "Community Scripts" and use `bencdr/code-server` or create your own based on [../deploy-vm/launch-code-server-linode.sh](launch-code-server-linode.sh).
1. Give your server a label and deploy with Ubuntu 20.10 and any size. Once your server starts, you can simply navigate to the IP address and get forwarded to a secure version of code-server, which will be proxied behind your GitHub account. For information on how this works, see [code-server --link](https://github.com/cdr/code-server#cloud-program-%EF%B8%8F).
<img src="../img/linode-launch-code-server.gif" alt="Linode launch code-server" width="700" />
1. Optional: To change the URL in the address bar from `linode-[xxxx]` to something more descriptive, you just need to change your hostname and restart code-server:
```sh
sudo hostnamectl set-hostname bens-devbox
sudo systemctl restart code-server@coder
```

View File

@@ -1,19 +1,20 @@
# Guide: Launching `code-server` on railway.app
[Railway](https://railway.app) is a new cloud development platform! ☁️ Use Railway + code-server to get a dev environment that you can access from any device.
[Railway](https://railway.app) is a new cloud development platform! ☁️
Use Railway + code-server to get a dev environment that you can access from any device.
![code-server and railway.app](../img/code-server-railway.png)
## Step 1: Click to deploy
## Step 1: Click button to deploy
[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/new?template=https%3A%2F%2Fgithub.com%2Fbpmct%2Fcode-server-railway&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)
## Step 2: Configure & launch your environment
![railway launch environment screen](../img/launch-railway.gif)
You'll need to make a new repository which will contain your code-server configuration. If you push changes to this repo (to install NodeJS, for example), it will re-deploy code-server.
<img src="../img/launch-railway.gif" alt="Connected git repo" width="650" />
You also need to specity a `PASSWORD` and a `GIT_REPO` to clone in your environment :)
## Step 3: Modify your environment to add additional tools
@@ -23,7 +24,7 @@ You also need to specity a `PASSWORD` and a `GIT_REPO` to clone in your environm
<img src="../img/railway-connected.png" alt="Connected git repo" width="400" />
1. Open the source repo in GitHub and edit the `Dockerfile`
1. Add some custom tools (like NodeJS) and commit to the main branch:
1. Add some custom tools (like NodeJS) and push to the main branch:
```Dockerfile
# You can add custom software and dependencies for your environment here. Some examples: