Skip to content

Commit e955da1

Browse files
authored
Merge pull request #1628 from cdr/docs
Revamp docs
2 parents 8626bed + 52eecca commit e955da1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1325
-497
lines changed

.github/workflows/ci.yaml

+58
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,24 @@ name: ci
33
on: [push, pull_request]
44

55
jobs:
6+
fmt:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v1
10+
- name: Run ./ci/steps/fmt.sh
11+
uses: ./ci/container
12+
with:
13+
args: ./ci/steps/fmt.sh
14+
15+
lint:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v1
19+
- name: Run ./ci/steps/lint.sh
20+
uses: ./ci/container
21+
with:
22+
args: ./ci/steps/lint.sh
23+
624
test:
725
runs-on: ubuntu-latest
826
steps:
@@ -88,3 +106,43 @@ jobs:
88106
with:
89107
name: release-packages
90108
path: ./release-packages
109+
110+
docker-amd64:
111+
runs-on: ubuntu-latest
112+
needs: linux-amd64
113+
steps:
114+
- uses: actions/checkout@v1
115+
- name: Download release package
116+
uses: actions/download-artifact@v2
117+
with:
118+
name: release-packages
119+
path: ./release-packages
120+
- name: Run ./ci/steps/build-docker-image.sh
121+
uses: ./ci/container
122+
with:
123+
args: ./ci/steps/build-docker-image.sh
124+
- name: Upload release image
125+
uses: actions/upload-artifact@v2
126+
with:
127+
name: release-images
128+
path: ./release-images
129+
130+
docker-arm64:
131+
runs-on: ubuntu-arm64-latest
132+
needs: linux-arm64
133+
steps:
134+
- uses: actions/checkout@v1
135+
- name: Download release package
136+
uses: actions/download-artifact@v2
137+
with:
138+
name: release-packages
139+
path: ./release-packages
140+
- name: Run ./ci/steps/build-docker-image.sh
141+
uses: ./ci/container
142+
with:
143+
args: ./ci/steps/build-docker-image.sh
144+
- name: Upload release image
145+
uses: actions/upload-artifact@v2
146+
with:
147+
name: release-images
148+
path: ./release-images

.github/workflows/publish.yaml

+10-20
Original file line numberDiff line numberDiff line change
@@ -13,29 +13,19 @@ jobs:
1313
uses: ./ci/container
1414
with:
1515
args: ./ci/steps/publish-npm.sh
16-
env:
17-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
1819

19-
docker-amd64:
20+
docker:
2021
runs-on: ubuntu-latest
2122
steps:
2223
- uses: actions/checkout@v1
23-
- name: Run ./ci/steps/publish-docker.sh
24+
- name: Run ./ci/steps/push-docker-manifest.sh
2425
uses: ./ci/container
2526
with:
26-
args: ./ci/steps/publish-docker.sh
27-
env:
28-
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
29-
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
30-
31-
docker-arm64:
32-
runs-on: ubuntu-arm64-latest
33-
steps:
34-
- uses: actions/checkout@v1
35-
- name: Run ./ci/steps/publish-docker.sh
36-
uses: ./ci/container
37-
with:
38-
args: ./ci/steps/publish-docker.sh
39-
env:
40-
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
41-
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
27+
args: ./ci/steps/push-docker-manifest.sh
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
31+
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ release/
66
release-static/
77
release-packages/
88
release-gcp/
9+
release-images/
910
node_modules

README.md

+76-28
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,95 @@
11
# code-server
22

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

6-
Try it out:
5+
- **Code everywhere:** Code on your Chromebook, tablet, and laptop with a
6+
consistent dev environment. Develop on a Linux machine and pick up from any
7+
device with a web browser.
8+
- **Server-powered:** Take advantage of large cloud servers to speed up tests, compilations, downloads, and more.
9+
Preserve battery life when you're on the go since all intensive tasks runs on your server.
10+
Make use of a spare computer you have lying around and turn it into a full development environment.
11+
12+
![Example gif](./doc/assets/code-server.gif)
13+
14+
## Getting started
15+
16+
For a full setup and walkthrough, please see [./doc/guide.md](./doc/guide.md).
17+
18+
### Debian, Ubuntu
719

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

12-
- **Code anywhere:** Code on your Chromebook, tablet, and laptop with a
13-
consistent dev environment. Develop on a Linux machine and pick up from any
14-
device with a web browser.
15-
- **Server-powered:** Take advantage of large cloud servers to speed up tests,
16-
compilations, downloads, and more. Preserve battery life when you're on the go
17-
since all intensive computation runs on your server.
27+
### Fedora, Red Hat, SUSE
28+
29+
```bash
30+
curl -sSOL https://github.com/cdr/code-server/releases/download/3.3.0/code-server-3.3.0-amd64.rpm
31+
sudo yum install -y code-server-3.3.0-amd64.rpm
32+
systemctl --user enable --now code-server
33+
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
34+
```
35+
36+
### npm
1837

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

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

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

25-
- 64-bit host.
26-
- At least 1GB of RAM.
27-
- 2 cores or more are recommended (1 core works but not optimally).
28-
- Secure connection over HTTPS or localhost (required for service workers and
29-
clipboard support).
30-
- For Linux: GLIBC 2.17 or later and GLIBCXX 3.4.15 or later.
46+
```bash
47+
npm install -g code-server
48+
code-server
49+
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
50+
```
51+
52+
### macOS
53+
54+
```bash
55+
brew install code-server
56+
brew services start code-server
57+
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
58+
```
3159

32-
### Run over SSH
60+
### Docker
3361

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

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

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

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

42-
1. [Download a release](https://github.com/cdr/code-server/releases). (Linux and macOS supported. Windows support planned.)
43-
2. Unpack the downloaded release then run the included `code-server` script.
44-
3. In your browser navigate to `localhost:8080`.
84+
Here is an example script for installing and using a static `code-server` release on Linux:
85+
86+
```bash
87+
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
88+
sudo mv /usr/local/code-server-3.3.0-linux-amd64 /usr/local/code-server
89+
PATH="$PATH:/usr/local/code-server/bin"
90+
code-server
91+
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
92+
```
4593

4694
## FAQ
4795

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

54102
## Enterprise
55103

56-
Visit [our enterprise page](https://coder.com) for more information about our
104+
Visit [our website](https://coder.com) for more information about our
57105
enterprise offerings.

0 commit comments

Comments
 (0)