Skip to content

Revamp docs #1628

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

Merged
merged 27 commits into from
May 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
41d625a
Revamp README.md with new installation options
nhooyr May 12, 2020
4aae5ea
CI fixes
nhooyr May 12, 2020
502c262
Mention update of versions in README install examples
nhooyr May 12, 2020
a346c6d
Document npm module install dependencies
nhooyr May 13, 2020
1739b21
Bundle VS Code node_modules to avoid yarn dependency
nhooyr May 13, 2020
d30f3db
Update to rc.10
nhooyr May 13, 2020
b3ae4d6
Hide bundled node_modules to prevent them from being ignored
nhooyr May 13, 2020
f4a7858
Make npm-postinstall.sh more robust
nhooyr May 13, 2020
a0a77e3
Add doc/guide.md
nhooyr May 14, 2020
f475767
Rename darwin releases to macos
nhooyr May 14, 2020
5651201
Copy old macOS data directory if applicable
nhooyr May 14, 2020
c69346a
Add FAQ entry on the config file
nhooyr May 14, 2020
0bd2602
3.3.0
nhooyr May 14, 2020
10b06ca
Minor typo fixes
nhooyr May 14, 2020
d723402
Use /usr/local instead of /opt in self contained release example
nhooyr May 15, 2020
40778b1
Add code-server version into VS Code about
nhooyr May 15, 2020
d4b3d21
Require minimum node 12
nhooyr May 15, 2020
89c5a4d
Set --frozen-lockfile with yarn when necessary
nhooyr May 15, 2020
73b2ff0
$PORT should always override port in --bind-addr
nhooyr May 15, 2020
181bad9
Improve docker install formatting
nhooyr May 15, 2020
611cde7
Fix spelling of Multi-tenancy in FAQ
nhooyr May 15, 2020
d563816
Use .tar.gz for macOS releases
nhooyr May 16, 2020
aee2599
Push docker manifest in CI for multi arch image
nhooyr May 16, 2020
6a25b3b
Document structure better
nhooyr May 17, 2020
e0dbd8f
Rename self contained release to static release
nhooyr May 17, 2020
3a1e3bc
Final revisions for the docs before release
nhooyr May 17, 2020
52eecca
v3.3.0
nhooyr May 17, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,24 @@ name: ci
on: [push, pull_request]

jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Run ./ci/steps/fmt.sh
uses: ./ci/container
with:
args: ./ci/steps/fmt.sh

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Run ./ci/steps/lint.sh
uses: ./ci/container
with:
args: ./ci/steps/lint.sh

test:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -88,3 +106,43 @@ jobs:
with:
name: release-packages
path: ./release-packages

docker-amd64:
runs-on: ubuntu-latest
needs: linux-amd64
steps:
- uses: actions/checkout@v1
- name: Download release package
uses: actions/download-artifact@v2
with:
name: release-packages
path: ./release-packages
- name: Run ./ci/steps/build-docker-image.sh
uses: ./ci/container
with:
args: ./ci/steps/build-docker-image.sh
- name: Upload release image
uses: actions/upload-artifact@v2
with:
name: release-images
path: ./release-images

docker-arm64:
runs-on: ubuntu-arm64-latest
needs: linux-arm64
steps:
- uses: actions/checkout@v1
- name: Download release package
uses: actions/download-artifact@v2
with:
name: release-packages
path: ./release-packages
- name: Run ./ci/steps/build-docker-image.sh
uses: ./ci/container
with:
args: ./ci/steps/build-docker-image.sh
- name: Upload release image
uses: actions/upload-artifact@v2
with:
name: release-images
path: ./release-images
30 changes: 10 additions & 20 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,19 @@ jobs:
uses: ./ci/container
with:
args: ./ci/steps/publish-npm.sh
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

docker-amd64:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Run ./ci/steps/publish-docker.sh
- name: Run ./ci/steps/push-docker-manifest.sh
uses: ./ci/container
with:
args: ./ci/steps/publish-docker.sh
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}

docker-arm64:
runs-on: ubuntu-arm64-latest
steps:
- uses: actions/checkout@v1
- name: Run ./ci/steps/publish-docker.sh
uses: ./ci/container
with:
args: ./ci/steps/publish-docker.sh
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
args: ./ci/steps/push-docker-manifest.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ release/
release-static/
release-packages/
release-gcp/
release-images/
node_modules
104 changes: 76 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,95 @@
# code-server
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@code-asher only review README.md for now pls


`code-server` is [VS Code](https://github.com/Microsoft/vscode) running on a
remote server, accessible through the browser.
Run [VS Code](https://github.com/Microsoft/vscode) on any machine anywhere and access it in the browser.

Try it out:
- **Code everywhere:** Code on your Chromebook, tablet, and laptop with a
consistent dev environment. Develop on a Linux machine and pick up from any
device with a web browser.
- **Server-powered:** Take advantage of large cloud servers to speed up tests, compilations, downloads, and more.
Preserve battery life when you're on the go since all intensive tasks runs on your server.
Make use of a spare computer you have lying around and turn it into a full development environment.

![Example gif](./doc/assets/code-server.gif)

## Getting started

For a full setup and walkthrough, please see [./doc/guide.md](./doc/guide.md).

### Debian, Ubuntu

```bash
docker run -it -p 127.0.0.1:8080:8080 -v "$PWD:/home/coder/project" -u "$(id -u):$(id -g)" codercom/code-server:latest
curl -sSOL https://github.com/cdr/code-server/releases/download/3.3.0/code-server_3.3.0_amd64.deb
sudo dpkg -i code-server_3.3.0_amd64.deb
systemctl --user enable --now code-server
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
```

- **Code anywhere:** Code on your Chromebook, tablet, and laptop with a
consistent dev environment. Develop on a Linux machine and pick up from any
device with a web browser.
- **Server-powered:** Take advantage of large cloud servers to speed up tests,
compilations, downloads, and more. Preserve battery life when you're on the go
since all intensive computation runs on your server.
### Fedora, Red Hat, SUSE

```bash
curl -sSOL https://github.com/cdr/code-server/releases/download/3.3.0/code-server-3.3.0-amd64.rpm
sudo yum install -y code-server-3.3.0-amd64.rpm
systemctl --user enable --now code-server
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
```

### npm

![Example gif](/doc/assets/code-server.gif)
We recommend installing from `npm` if we don't have a precompiled release for your machine's
platform or architecture.

## Getting Started
**note:** Installing via `npm` builds native modules on install and so requires C dependencies.
See [./doc/npm.md](./doc/npm.md) for installing these dependencies.

### Requirements
You will need at least node v12 installed. See [#1633](https://github.com/cdr/code-server/issues/1633).

- 64-bit host.
- At least 1GB of RAM.
- 2 cores or more are recommended (1 core works but not optimally).
- Secure connection over HTTPS or localhost (required for service workers and
clipboard support).
- For Linux: GLIBC 2.17 or later and GLIBCXX 3.4.15 or later.
```bash
npm install -g code-server
code-server
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To match the others should we put the Now visit line here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opted against so that user's would read the output but I'll add for visual consistency.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense.


### macOS

```bash
brew install code-server
brew services start code-server
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
```

### Run over SSH
### Docker

Use [sshcode](https://github.com/codercom/sshcode) for a simple setup.
```bash
# This will start a code-server container and expose it at http://127.0.0.1:8080.
# It will also mount your current directory into the container as `/home/coder/project`
# and forward your UID/GID so that all file system operations occur as your user outside
# the container.
docker run -it -p 127.0.0.1:8080:8080 \
-v "$PWD:/home/coder/project" \
-u "$(id -u):$(id -g)" \
codercom/code-server:latest
```

### Static releases

### Digital Ocean
We publish self contained `.tar.gz` archives for every release on [github](https://github.com/cdr/code-server/releases).
They bundle the node binary and compiled native modules.

[![Create a Droplet](./doc/assets/droplet.svg)](https://marketplace.digitalocean.com/apps/code-server)
1. Download the latest release archive for your system from [github](https://github.com/cdr/code-server/releases).
2. Unpack the release.
3. You can run code-server by executing `./bin/code-server`.

### Releases
Add the code-server `bin` directory to your `$PATH` to easily execute `code-server` without the full path every time.

1. [Download a release](https://github.com/cdr/code-server/releases). (Linux and macOS supported. Windows support planned.)
2. Unpack the downloaded release then run the included `code-server` script.
3. In your browser navigate to `localhost:8080`.
Here is an example script for installing and using a static `code-server` release on Linux:

```bash
curl -sSL https://github.com/cdr/code-server/releases/download/3.3.0/code-server-3.3.0-linux-amd64.tar.gz | sudo tar -C /usr/local -xz
sudo mv /usr/local/code-server-3.3.0-linux-amd64 /usr/local/code-server
PATH="$PATH:/usr/local/code-server/bin"
code-server
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
```

## FAQ

Expand All @@ -53,5 +101,5 @@ See [./doc/CONTRIBUTING.md](./doc/CONTRIBUTING.md).

## Enterprise

Visit [our enterprise page](https://coder.com) for more information about our
Visit [our website](https://coder.com) for more information about our
enterprise offerings.
Loading