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
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,17 @@ See docker oneliner mentioned above. Dockerfile is at [/Dockerfile](/Dockerfile)
> You will be prompted to enter the password shown in the CLI
`code-server` should now be running at https://localhost:8443.

> code-server uses a self-signed SSL certificate that may prompt your browser to ask you some additional questions before you proceed. Please [read here](doc/self-hosted/index.md) for more information.
> code-server uses a self-signed SSL certificate that may prompt your browser to ask you some additional questions before you proceed. [Read here](doc/self-hosted/index.md) for more information.

For detailed instructions and troubleshooting, see the [self-hosted quick start guide](doc/self-hosted/index.md).

Quickstart guides for [Google Cloud](doc/admin/install/google_cloud.md), [AWS](doc/admin/install/aws.md), and [Digital Ocean](doc/admin/install/digitalocean.md).

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

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

## Development

### Known Issues
Expand Down
40 changes: 40 additions & 0 deletions doc/self-hosted/build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Building 🏗️

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

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

## Steps
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`)

### 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
```
24 changes: 13 additions & 11 deletions doc/self-hosted/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,19 @@ ARGUMENTS
WORKDIR [default: (directory to binary)] Specify working dir

OPTIONS
-d, --data-dir=data-dir
-h, --host=host [default: 0.0.0.0]
-o, --open Open in browser on startup
-p, --port=port [default: 8443] Port to bind on
-v, --version show CLI version
--allow-http
--cert=cert
--cert-key=cert-key
--help show CLI help
--no-auth
--password=password
--cert <value>
--cert-key <value>
-e, --extensions-dir <dir> Set the root path for extensions.
-d --user-data-dir <dir> Specifies the directory that user data is kept in, useful when running as root.
--data-dir <value> DEPRECATED: Use '--user-data-dir' instead. Customize where user-data is stored.
-h, --host <value> Customize the hostname. (default: "0.0.0.0")
-o, --open Open in the browser on startup.
-p, --port <number> Port to bind on. (default: 8443)
-N, --no-auth Start without requiring authentication.
-H, --allow-http Allow http connections.
-P, --password <value> DEPRECATED: Use the PASSWORD environment variable instead. Specify a password for authentication.
--disable-telemetry Disables ALL telemetry.
--install-extension <value> Install an extension by its ID.
```

### Data Directory
Expand Down
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"
}
}