Compare commits
7 Commits
1.32.0-282
...
1.32.0-310
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2169045377 | ||
|
|
277c6cb690 | ||
|
|
91a98b8082 | ||
|
|
6028a8b1a8 | ||
|
|
6749f25bbf | ||
|
|
f6b96e3778 | ||
|
|
3b8cd0a3cd |
@@ -9,7 +9,7 @@
|
||||
|
||||
Try it out:
|
||||
```bash
|
||||
docker run -t -p 127.0.0.1:8443:8443 -v "${PWD}:/root/project" codercom/code-server --allow-http --no-auth
|
||||
docker run -t -p 127.0.0.1:8443:8443 -v "${PWD}:/root/project" codercom/code-server code-server --allow-http --no-auth
|
||||
```
|
||||
|
||||
- Code on your Chromebook, tablet, and laptop with a consistent dev environment.
|
||||
|
||||
74
deployment/aws/deployment.yaml
Normal file
74
deployment/aws/deployment.yaml
Normal file
@@ -0,0 +1,74 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: code-server
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: code-server
|
||||
namespace: code-server
|
||||
spec:
|
||||
ports:
|
||||
- port: 8443
|
||||
name: https
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: code-server
|
||||
type: ClusterIP
|
||||
---
|
||||
kind: StorageClass
|
||||
apiVersion: storage.k8s.io/v1
|
||||
metadata:
|
||||
name: gp2
|
||||
annotations:
|
||||
storageclass.kubernetes.io/is-default-class: "true"
|
||||
provisioner: kubernetes.io/aws-ebs
|
||||
parameters:
|
||||
type: gp2
|
||||
fsType: ext4
|
||||
---
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: code-store
|
||||
namespace: code-server
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 60Gi
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: code-server
|
||||
name: code-server
|
||||
namespace: code-server
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: code-server
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: code-server
|
||||
spec:
|
||||
containers:
|
||||
- image: codercom/code-server
|
||||
imagePullPolicy: Always
|
||||
name: code-servery
|
||||
ports:
|
||||
- containerPort: 8443
|
||||
name: https
|
||||
volumeMounts:
|
||||
- name: code-server-storage
|
||||
mountPath: /go/src
|
||||
volumes:
|
||||
- name: code-server-storage
|
||||
persistentVolumeClaim:
|
||||
claimName: code-store
|
||||
|
||||
43
deployment/deployment.yaml
Normal file
43
deployment/deployment.yaml
Normal file
@@ -0,0 +1,43 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: code-server
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: code-server
|
||||
namespace: code-server
|
||||
spec:
|
||||
ports:
|
||||
- port: 8443
|
||||
name: https
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: code-server
|
||||
type: ClusterIP
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: code-server
|
||||
name: code-server
|
||||
namespace: code-server
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: code-server
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: code-server
|
||||
spec:
|
||||
containers:
|
||||
- image: codercom/code-server
|
||||
imagePullPolicy: Always
|
||||
name: code-server
|
||||
ports:
|
||||
- containerPort: 8443
|
||||
name: https
|
||||
@@ -32,16 +32,28 @@ If you're just starting out, we recommend [installing code-server locally](../..
|
||||
```
|
||||
>example: `ssh -i "/Users/John/Downloads/TestInstance.pem" ubuntu@ec2-3-45-678-910.compute-1.amazonaws.co`
|
||||
- You should see a prompt for your EC2 instance like so<img src="../../assets/aws_ubuntu.png">
|
||||
- At this point it is time to download the `code-server` binary. We will of course want the linux version. Make sure you copy the link for the latest linux version on our [releases page](https://github.com/codercom/code-server/releases)
|
||||
- With the URL in the clipboard, run:
|
||||
- At this point it is time to download the `code-server` binary. We will of course want the linux version.
|
||||
- Find the latest Linux release from this URL:
|
||||
```
|
||||
wget https://github.com/codercom/code-server/releases/download/0.1.4/code-server-linux
|
||||
https://github.com/codercom/code-server/releases/latest
|
||||
```
|
||||
- Replace {version} in the following command with the version found on the releases page and run it (or just copy the download URL from the releases page):
|
||||
```
|
||||
wget https://github.com/codercom/code-server/releases/download/{version}/code-server-{version}-linux-x64.tar.gz
|
||||
```
|
||||
- Extract the downloaded tar.gz file with this command, for example:
|
||||
```
|
||||
tar -xvzf code-server-{version}-linux-x64.tar.gz
|
||||
```
|
||||
- Navigate to extracted directory with this command:
|
||||
```
|
||||
cd code-server-{version}-linux-x64
|
||||
```
|
||||
- If you run into any permission errors, make the binary executable by running:
|
||||
```
|
||||
chmod +x code-server-linux
|
||||
chmod +x code-server
|
||||
```
|
||||
> To ensure the connection between you and your server is encrypted view our guide on [securing your setup](../security/ssl.md)
|
||||
> To ensure the connection between you and your server is encrypted view our guide on [securing your setup](../../security/ssl.md)
|
||||
- Finally, run
|
||||
```
|
||||
sudo ./code-server-linux -p 80
|
||||
|
||||
@@ -16,15 +16,27 @@ If you're just starting out, we recommend [installing code-server locally](../..
|
||||
- Open a terminal on your computer and SSH into your instance
|
||||
> example: ssh root@203.0.113.0
|
||||
- Once in the SSH session, visit code-server [releases page](https://github.com/codercom/code-server/releases/) and copy the link to the download for the latest linux release
|
||||
- In the shell run the below command with the URL from your clipboard
|
||||
- Find the latest Linux release from this URL:
|
||||
```
|
||||
wget https://github.com/codercom/code-server/releases/download/0.1.4/code-server-linux
|
||||
https://github.com/codercom/code-server/releases/latest
|
||||
```
|
||||
- Replace {version} in the following command with the version found on the releases page and run it (or just copy the download URL from the releases page):
|
||||
```
|
||||
wget https://github.com/codercom/code-server/releases/download/{version}/code-server-{version}-linux-x64.tar.gz
|
||||
```
|
||||
- Extract the downloaded tar.gz file with this command, for example:
|
||||
```
|
||||
tar -xvzf code-server-{version}-linux-x64.tar.gz
|
||||
```
|
||||
- Navigate to extracted directory with this command:
|
||||
```
|
||||
cd code-server-{version}-linux-x64
|
||||
```
|
||||
- If you run into any permission errors when attempting to run the binary:
|
||||
```
|
||||
chmod +x code-server-linux
|
||||
chmod +x code-server
|
||||
```
|
||||
> To ensure the connection between you and your server is encrypted view our guide on [securing your setup](../security/ssl.md)
|
||||
> To ensure the connection between you and your server is encrypted view our guide on [securing your setup](../../security/ssl.md)
|
||||
- Finally start the code-server
|
||||
```
|
||||
sudo ./code-server-linux -p 80
|
||||
|
||||
@@ -13,34 +13,59 @@ If you're just starting out, we recommend [installing code-server locally](../..
|
||||
- Choose an appropriate machine type (we recommend 2 vCPU and 7.5 GB RAM, more depending on team size and number of repositories/languages enabled)
|
||||
- Choose Ubuntu 16.04 LTS as your boot disk
|
||||
- Check the boxes for **Allow HTTP traffic** and **Allow HTTPS traffic** in the **Firewall** section
|
||||
- Create your VM, and **take note** of it's public IP address.
|
||||
- Create your VM, and **take note** of its public IP address.
|
||||
- Copy the link to download the latest Linux binary from our [releases page](https://github.com/codercom/code-server/releases)
|
||||
|
||||
---
|
||||
|
||||
## Final Steps
|
||||
|
||||
1. SSH into your Google Cloud VM
|
||||
- SSH into your Google Cloud VM
|
||||
```
|
||||
gcloud compute ssh --zone [region] [instance name]
|
||||
```
|
||||
2. Download the binary using the link we copied to clipboard
|
||||
|
||||
- Find the latest Linux release from this URL:
|
||||
```
|
||||
wget https://github.com/codercom/code-server/releases/download/0.1.4/code-server-linux
|
||||
https://github.com/codercom/code-server/releases/latest
|
||||
```
|
||||
3. Make the binary executable if you run into any errors regarding permission:
|
||||
```
|
||||
chmod +x code-server-linux
|
||||
```
|
||||
|
||||
- Replace {version} in the following command with the version found on the releases page and run it (or just copy the download URL from the releases page):
|
||||
```
|
||||
wget https://github.com/codercom/code-server/releases/download/{version}/code-server-{version}-linux-x64.tar.gz
|
||||
```
|
||||
|
||||
- Extract the downloaded tar.gz file with this command, for example:
|
||||
```
|
||||
tar -xvzf code-server-{version}-linux-x64.tar.gz
|
||||
```
|
||||
|
||||
- Navigate to extracted directory with this command:
|
||||
```
|
||||
cd code-server-{version}-linux-x64
|
||||
```
|
||||
|
||||
- Make the binary executable if you run into any errors regarding permission:
|
||||
```
|
||||
chmod +x code-server
|
||||
```
|
||||
|
||||
> To ensure the connection between you and your server is encrypted view our guide on [securing your setup](../security/ssl.md)
|
||||
4. Start the code-server
|
||||
|
||||
- Start the code-server
|
||||
```
|
||||
sudo ./code-server-linux -p 80
|
||||
```
|
||||
|
||||
> For instructions on how to keep the server running after you end your SSH session please checkout [how to use systemd](https://www.linode.com/docs/quick-answers/linux/start-service-at-boot/) to start linux based services if they are killed
|
||||
5. Access code-server from the public IP of your Google Cloud instance we noted earlier in your browser.
|
||||
|
||||
- Access code-server from the public IP of your Google Cloud instance we noted earlier in your browser.
|
||||
> example: 32.32.32.234
|
||||
6. You will be greeted with this page. Code-server is using a self-signed SSL certificate for easy setup. To proceed to the IDE, click **"Advanced"**<img src ="../../assets/chrome_warning.png">
|
||||
7. Then click **"proceed anyway"**<img src="../../assets/chrome_confirm.png">
|
||||
|
||||
- You will be greeted with this page. Code-server is using a self-signed SSL certificate for easy setup. To proceed to the IDE, click **"Advanced"**<img src ="../../assets/chrome_warning.png">
|
||||
|
||||
- Then click **"proceed anyway"**<img src="../../assets/chrome_confirm.png">
|
||||
|
||||
---
|
||||
> NOTE: If you get stuck or need help, [file an issue](https://github.com/codercom/code-server/issues/new?&title=Improve+self-hosted+quickstart+guide), [tweet (@coderhq)](https://twitter.com/coderhq) or [email](mailto:support@coder.com?subject=Self-hosted%20quickstart%20guide).
|
||||
|
||||
> NOTE: If you get stuck or need help, [file an issue](https://github.com/codercom/code-server/issues/new?&title=Improve+self-hosted+quickstart+guide), [tweet (@coderhq)](https://twitter.com/coderhq) or [email](mailto:support@coder.com?subject=Self-hosted%20quickstart%20guide).
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
import * as fse from "fs-extra";
|
||||
import { field, logger } from "@coder/logger";
|
||||
import { ServerMessage, SharedProcessActiveMessage } from "@coder/protocol/src/proto";
|
||||
import { Command, flags } from "@oclif/command";
|
||||
import { fork, ForkOptions, ChildProcess } from "child_process";
|
||||
import { ChildProcess, fork, ForkOptions, spawn } from "child_process";
|
||||
import { randomFillSync } from "crypto";
|
||||
import * as fs from "fs";
|
||||
import * as fse from "fs-extra";
|
||||
import * as os from "os";
|
||||
import * as path from "path";
|
||||
import * as WebSocket from "ws";
|
||||
import { createApp } from "./server";
|
||||
import { requireModule, requireFork, forkModule } from "./vscode/bootstrapFork";
|
||||
import { SharedProcess, SharedProcessState } from "./vscode/sharedProcess";
|
||||
import { setup as setupNativeModules } from "./modules";
|
||||
import { buildDir, cacheHome, dataHome, isCli, serveStatic } from "./constants";
|
||||
import { fillFs } from "./fill";
|
||||
import { isCli, serveStatic, buildDir, dataHome, cacheHome } from "./constants";
|
||||
import { setup as setupNativeModules } from "./modules";
|
||||
import { createApp } from "./server";
|
||||
import { forkModule, requireFork, requireModule } from "./vscode/bootstrapFork";
|
||||
import { SharedProcess, SharedProcessState } from "./vscode/sharedProcess";
|
||||
import opn = require("opn");
|
||||
|
||||
export class Entry extends Command {
|
||||
@@ -187,7 +187,14 @@ export class Entry extends Command {
|
||||
return forkModule(options.env.AMD_ENTRYPOINT, args, options, dataDir);
|
||||
}
|
||||
|
||||
return fork(modulePath, args, options);
|
||||
if (isCli) {
|
||||
return spawn(process.execPath, ["--fork", modulePath, "--args", JSON.stringify(args), "--data-dir", dataDir], {
|
||||
...options,
|
||||
stdio: [null, null, null, "ipc"],
|
||||
});
|
||||
} else {
|
||||
return fork(modulePath, args, options);
|
||||
}
|
||||
},
|
||||
},
|
||||
password,
|
||||
|
||||
@@ -46,12 +46,13 @@ export const requireFork = (modulePath: string, args: string[], builtInExtension
|
||||
const Module = require("module") as typeof import("module");
|
||||
const oldRequire = Module.prototype.require;
|
||||
// tslint:disable-next-line:no-any
|
||||
Module.prototype.require = (id: string): any => {
|
||||
Module.prototype.require = function (id: string): any {
|
||||
if (id === "typescript") {
|
||||
return require("typescript");
|
||||
}
|
||||
|
||||
return oldRequire(id);
|
||||
// tslint:disable-next-line:no-any
|
||||
return oldRequire.call(this, id as any);
|
||||
};
|
||||
|
||||
if (!process.send) {
|
||||
@@ -59,7 +60,6 @@ export const requireFork = (modulePath: string, args: string[], builtInExtension
|
||||
}
|
||||
|
||||
process.argv = ["", "", ...args];
|
||||
|
||||
requireFilesystemModule(modulePath, builtInExtensionsDir);
|
||||
|
||||
if (ipcMsgBuffer && ipcMsgListener) {
|
||||
|
||||
@@ -350,13 +350,16 @@ index 58ba2e5..4fb6272 100644
|
||||
- r = require.__$__nodeRequire<T>(modulePath);
|
||||
+ r = (global as any).nativeNodeRequire(modulePath);
|
||||
diff --git a/src/vs/workbench/api/node/extHostTypeConverters.ts b/src/vs/workbench/api/node/extHostTypeConverters.ts
|
||||
index a445750..c7beb13 100644
|
||||
index a445750..c64712b 100644
|
||||
--- a/src/vs/workbench/api/node/extHostTypeConverters.ts
|
||||
+++ b/src/vs/workbench/api/node/extHostTypeConverters.ts
|
||||
@@ -26 +25,0 @@ import { ExtHostDocumentsAndEditors } from 'vs/workbench/api/node/extHostDocumen
|
||||
-import { isString, isNumber } from 'vs/base/common/types';
|
||||
@@ -116,0 +116 @@ export namespace Diagnostic {
|
||||
@@ -31 +29,0 @@ import { LogLevel as _MainLogLevel } from 'vs/platform/log/common/log';
|
||||
-import { coalesce } from 'vs/base/common/arrays';
|
||||
@@ -116,0 +115,2 @@ export namespace Diagnostic {
|
||||
+ const { isString, isNumber } = require('vs/base/common/types');
|
||||
+ const { coalesce } = require('vs/base/common/arrays');
|
||||
diff --git a/src/vs/workbench/browser/dnd.ts b/src/vs/workbench/browser/dnd.ts
|
||||
index 5897ab9..57b926e 100644
|
||||
--- a/src/vs/workbench/browser/dnd.ts
|
||||
|
||||
Reference in New Issue
Block a user