Skip to content

Feat/build steps #517

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

Closed
wants to merge 14 commits into from
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ Quickstart guides for [Google Cloud](doc/admin/install/google_cloud.md), [AWS](d

How to [secure your setup](/doc/security/ssl.md).

## Build Instructions
Please visit our [build guide](/doc/self-hosted/build.md) for steps on how to build the binary.

## Development

### Known Issues
Expand Down
Binary file added doc/assets/password_entry.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 45 additions & 0 deletions doc/self-hosted/build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Building instructions for code-server 🏗️

code-server has several yarn tasks for building the entire binary or specific portions of the app. This guide provides steps to do the aforementioned tasks.

**NOTE:** Windows compatibility is in the works

### Requirements
- Node 10.15.1+: https://nodejs.org/en/download/releases/

## Build the binary
1. Clone the [repository](https://github.com/codercom/code-server.git)
2. `cd` into `code-server`
3. Run `yarn`
4. Run `yarn task build:server:binary`
> Binary will be placed in `packages/server` named after the platform and architecture (`cli-darwin-x64`)

### Run without building
Running from the binary is possible with `yarn-start` after you have built the binary at least once. This is required for bootstrap-fork and built in extensions to work properly.

### Build Tasks

- **bootstrap-fork**: Forks VS Code sub-processes such as the shared process, extension host, searcher, and watcher
```bash
yarn task build:bootstrap-fork
```
- **binary package**: Packages existing built files with [nbin](https://github.com/codercom/nbin)
```bash
yarn task build:server:binary:package
```
- **app browser**: Builds the login page for authenticated servers
```bash
yarn task build:app:browser
```
- **web**: Builds the VS Code editor
```bash
yarn task build:web
```
- **package**: Packages code-server for release in `.gz` and `.zip` format
```bash
yarn task package
```
- **bundle**: Runs all yarn task with the exception of `package`
```bash
yarn task build:server:bundle
```
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"build:rules": "cd ./rules && tsc -p .",
"packages:install": "cd ./packages && yarn",
"postinstall": "npm-run-all --parallel packages:install build:rules",
"start": "cd ./packages/server && yarn start",
"start": "cd ./packages/server && yarn start --no-auth",
"task": "ts-node -r tsconfig-paths/register build/tasks.ts",
"test": "cd ./packages && yarn test"
},
Expand Down Expand Up @@ -66,5 +66,8 @@
"node-pty": "0.8.1",
"spdlog": "0.8.1",
"webpack-merge": "^4.2.1"
},
"engines": {
"node": ">=10.15.1"
}
}