diff --git a/README.md b/README.md index 547c336c1ca7..fbe992e8656a 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ 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). @@ -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 +Visit our [build guide](/doc/self-hosted/build.md) for steps on how to build the binary. + ## Development ### Known Issues diff --git a/doc/self-hosted/build.md b/doc/self-hosted/build.md new file mode 100644 index 000000000000..68ddd4012a36 --- /dev/null +++ b/doc/self-hosted/build.md @@ -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 + ``` \ No newline at end of file diff --git a/doc/self-hosted/index.md b/doc/self-hosted/index.md index c3ee6a998d1f..866347858ad3 100644 --- a/doc/self-hosted/index.md +++ b/doc/self-hosted/index.md @@ -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 + --cert-key + -e, --extensions-dir Set the root path for extensions. + -d --user-data-dir Specifies the directory that user data is kept in, useful when running as root. + --data-dir DEPRECATED: Use '--user-data-dir' instead. Customize where user-data is stored. + -h, --host Customize the hostname. (default: "0.0.0.0") + -o, --open Open in the browser on startup. + -p, --port Port to bind on. (default: 8443) + -N, --no-auth Start without requiring authentication. + -H, --allow-http Allow http connections. + -P, --password DEPRECATED: Use the PASSWORD environment variable instead. Specify a password for authentication. + --disable-telemetry Disables ALL telemetry. + --install-extension Install an extension by its ID. ``` ### Data Directory diff --git a/package.json b/package.json index 8ef3c956af45..d0d42c3b176c 100644 --- a/package.json +++ b/package.json @@ -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" }, @@ -66,5 +66,8 @@ "node-pty": "0.8.1", "spdlog": "0.8.1", "webpack-merge": "^4.2.1" + }, + "engines": { + "node": ">=10.15.1" } }