Compare commits
9 Commits
1.32.0-275
...
1.32.0-310
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2169045377 | ||
|
|
277c6cb690 | ||
|
|
91a98b8082 | ||
|
|
6028a8b1a8 | ||
|
|
6749f25bbf | ||
|
|
f6b96e3778 | ||
|
|
3b8cd0a3cd | ||
|
|
2f27b5df8c | ||
|
|
400fba7f6f |
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
Try it out:
|
Try it out:
|
||||||
```bash
|
```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.
|
- 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`
|
>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">
|
- 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)
|
- At this point it is time to download the `code-server` binary. We will of course want the linux version.
|
||||||
- With the URL in the clipboard, run:
|
- 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:
|
- 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
|
- Finally, run
|
||||||
```
|
```
|
||||||
sudo ./code-server-linux -p 80
|
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
|
- Open a terminal on your computer and SSH into your instance
|
||||||
> example: ssh root@203.0.113.0
|
> 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
|
- 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:
|
- 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
|
- Finally start the code-server
|
||||||
```
|
```
|
||||||
sudo ./code-server-linux -p 80
|
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 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
|
- Choose Ubuntu 16.04 LTS as your boot disk
|
||||||
- Check the boxes for **Allow HTTP traffic** and **Allow HTTPS traffic** in the **Firewall** section
|
- 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)
|
- Copy the link to download the latest Linux binary from our [releases page](https://github.com/codercom/code-server/releases)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Final Steps
|
## Final Steps
|
||||||
|
|
||||||
1. SSH into your Google Cloud VM
|
- SSH into your Google Cloud VM
|
||||||
```
|
```
|
||||||
gcloud compute ssh --zone [region] [instance name]
|
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:
|
|
||||||
```
|
- 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):
|
||||||
chmod +x code-server-linux
|
```
|
||||||
```
|
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)
|
> 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
|
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
|
> 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
|
> 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).
|
||||||
|
|||||||
@@ -46,7 +46,9 @@ const newCreateElement = <K extends keyof HTMLElementTagNameMap>(tagName: K): HT
|
|||||||
return oldSrc!.get!.call(img);
|
return oldSrc!.get!.call(img);
|
||||||
},
|
},
|
||||||
set: (value: string): void => {
|
set: (value: string): void => {
|
||||||
value = value.replace(/file:\/\//g, "/resource");
|
if (value) {
|
||||||
|
value = value.replace(/file:\/\//g, "/resource");
|
||||||
|
}
|
||||||
oldSrc!.set!.call(img, value);
|
oldSrc!.set!.call(img, value);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -65,7 +67,9 @@ const newCreateElement = <K extends keyof HTMLElementTagNameMap>(tagName: K): HT
|
|||||||
return oldInnerHtml!.get!.call(style);
|
return oldInnerHtml!.get!.call(style);
|
||||||
},
|
},
|
||||||
set: (value: string): void => {
|
set: (value: string): void => {
|
||||||
value = value.replace(/file:\/\//g, "/resource");
|
if (value) {
|
||||||
|
value = value.replace(/file:\/\//g, "/resource");
|
||||||
|
}
|
||||||
oldInnerHtml!.set!.call(style, value);
|
oldInnerHtml!.set!.call(style, value);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
import * as fse from "fs-extra";
|
|
||||||
import { field, logger } from "@coder/logger";
|
import { field, logger } from "@coder/logger";
|
||||||
import { ServerMessage, SharedProcessActiveMessage } from "@coder/protocol/src/proto";
|
import { ServerMessage, SharedProcessActiveMessage } from "@coder/protocol/src/proto";
|
||||||
import { Command, flags } from "@oclif/command";
|
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 { randomFillSync } from "crypto";
|
||||||
import * as fs from "fs";
|
import * as fs from "fs";
|
||||||
|
import * as fse from "fs-extra";
|
||||||
import * as os from "os";
|
import * as os from "os";
|
||||||
import * as path from "path";
|
import * as path from "path";
|
||||||
import * as WebSocket from "ws";
|
import * as WebSocket from "ws";
|
||||||
import { createApp } from "./server";
|
import { buildDir, cacheHome, dataHome, isCli, serveStatic } from "./constants";
|
||||||
import { requireModule, requireFork, forkModule } from "./vscode/bootstrapFork";
|
|
||||||
import { SharedProcess, SharedProcessState } from "./vscode/sharedProcess";
|
|
||||||
import { setup as setupNativeModules } from "./modules";
|
|
||||||
import { fillFs } from "./fill";
|
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");
|
import opn = require("opn");
|
||||||
|
|
||||||
export class Entry extends Command {
|
export class Entry extends Command {
|
||||||
@@ -187,7 +187,14 @@ export class Entry extends Command {
|
|||||||
return forkModule(options.env.AMD_ENTRYPOINT, args, options, dataDir);
|
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,
|
password,
|
||||||
|
|||||||
@@ -46,12 +46,13 @@ export const requireFork = (modulePath: string, args: string[], builtInExtension
|
|||||||
const Module = require("module") as typeof import("module");
|
const Module = require("module") as typeof import("module");
|
||||||
const oldRequire = Module.prototype.require;
|
const oldRequire = Module.prototype.require;
|
||||||
// tslint:disable-next-line:no-any
|
// tslint:disable-next-line:no-any
|
||||||
Module.prototype.require = (id: string): any => {
|
Module.prototype.require = function (id: string): any {
|
||||||
if (id === "typescript") {
|
if (id === "typescript") {
|
||||||
return require("typescript");
|
return require("typescript");
|
||||||
}
|
}
|
||||||
|
|
||||||
return oldRequire(id);
|
// tslint:disable-next-line:no-any
|
||||||
|
return oldRequire.call(this, id as any);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!process.send) {
|
if (!process.send) {
|
||||||
@@ -59,7 +60,6 @@ export const requireFork = (modulePath: string, args: string[], builtInExtension
|
|||||||
}
|
}
|
||||||
|
|
||||||
process.argv = ["", "", ...args];
|
process.argv = ["", "", ...args];
|
||||||
|
|
||||||
requireFilesystemModule(modulePath, builtInExtensionsDir);
|
requireFilesystemModule(modulePath, builtInExtensionsDir);
|
||||||
|
|
||||||
if (ipcMsgBuffer && ipcMsgListener) {
|
if (ipcMsgBuffer && ipcMsgListener) {
|
||||||
|
|||||||
@@ -349,6 +349,17 @@ index 58ba2e5..4fb6272 100644
|
|||||||
@@ -774 +774 @@ function loadCommonJSModule<T>(logService: ILogService, modulePath: string, acti
|
@@ -774 +774 @@ function loadCommonJSModule<T>(logService: ILogService, modulePath: string, acti
|
||||||
- r = require.__$__nodeRequire<T>(modulePath);
|
- r = require.__$__nodeRequire<T>(modulePath);
|
||||||
+ r = (global as any).nativeNodeRequire(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..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';
|
||||||
|
@@ -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
|
diff --git a/src/vs/workbench/browser/dnd.ts b/src/vs/workbench/browser/dnd.ts
|
||||||
index 5897ab9..57b926e 100644
|
index 5897ab9..57b926e 100644
|
||||||
--- a/src/vs/workbench/browser/dnd.ts
|
--- a/src/vs/workbench/browser/dnd.ts
|
||||||
|
|||||||
Reference in New Issue
Block a user