Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
16cbbcb99f |
11
ci/build/code-server-user.service
Normal file
11
ci/build/code-server-user.service
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=code-server
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=exec
|
||||||
|
ExecStart=/usr/bin/code-server
|
||||||
|
Restart=always
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
@@ -6,6 +6,7 @@ After=network.target
|
|||||||
Type=exec
|
Type=exec
|
||||||
ExecStart=/usr/bin/code-server
|
ExecStart=/usr/bin/code-server
|
||||||
Restart=always
|
Restart=always
|
||||||
|
User=%i
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=default.target
|
WantedBy=default.target
|
||||||
|
|||||||
@@ -12,5 +12,6 @@ homepage: "https://github.com/cdr/code-server"
|
|||||||
license: "MIT"
|
license: "MIT"
|
||||||
files:
|
files:
|
||||||
./ci/build/code-server-nfpm.sh: /usr/bin/code-server
|
./ci/build/code-server-nfpm.sh: /usr/bin/code-server
|
||||||
./ci/build/code-server.service: /usr/lib/systemd/user/code-server.service
|
./ci/build/code-server.service: /usr/lib/systemd/system/code-server.service
|
||||||
|
./ci/build/code-server-user.service: /usr/lib/systemd/user/code-server.service
|
||||||
./release-standalone/**/*: "/usr/lib/code-server/"
|
./release-standalone/**/*: "/usr/lib/code-server/"
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ Please refer to [VS Code's prerequisites](https://github.com/Microsoft/vscode/wi
|
|||||||
Differences:
|
Differences:
|
||||||
|
|
||||||
- We require a minimum of node v12 but later versions should work.
|
- We require a minimum of node v12 but later versions should work.
|
||||||
- We use [nfpm](https://github.com/goreleaser/nfpm) to build `.deb` and `.rpm` packages.
|
- We use [fnpm](https://github.com/goreleaser/nfpm) to build `.deb` and `.rpm` packages.
|
||||||
- We use [jq](https://stedolan.github.io/jq/) to build code-server releases.
|
- We use [jq](https://stedolan.github.io/jq/) to build code-server releases.
|
||||||
- The [CI container](../ci/images/debian8/Dockerfile) is a useful reference for all our dependencies.
|
- The [CI container](../ci/images/debian8/Dockerfile) is a useful reference for all our dependencies.
|
||||||
|
|
||||||
|
|||||||
15
doc/FAQ.md
15
doc/FAQ.md
@@ -86,20 +86,9 @@ If you have your own marketplace that implements the VS Code Extension Gallery A
|
|||||||
point code-server to it by setting `$SERVICE_URL` and `$ITEM_URL`. These correspond directly
|
point code-server to it by setting `$SERVICE_URL` and `$ITEM_URL`. These correspond directly
|
||||||
to `serviceUrl` and `itemUrl` in VS Code's `product.json`.
|
to `serviceUrl` and `itemUrl` in VS Code's `product.json`.
|
||||||
|
|
||||||
e.g. to use [open-vsx.org](https://open-vsx.org):
|
|
||||||
|
|
||||||
```bash
|
|
||||||
export SERVICE_URL=https://open-vsx.org/vscode/gallery
|
|
||||||
export ITEM_URL=https://open-vsx.org/vscode/item
|
|
||||||
```
|
|
||||||
|
|
||||||
While you can technically use Microsoft's marketplace with these, please do not do so as it
|
While you can technically use Microsoft's marketplace with these, please do not do so as it
|
||||||
is against their terms of use. See [above](#differences-compared-to-vs-code) and this
|
is against their terms of use. See [above](#differences-compared-to-vs-code). These variables
|
||||||
discussion regarding the use of the Microsoft URLs in forks:
|
are most valuable to our enterprise customers for whom we have a self hosted marketplace product.
|
||||||
|
|
||||||
https://github.com/microsoft/vscode/issues/31168#issue-244533026
|
|
||||||
|
|
||||||
These variables are most valuable to our enterprise customers for whom we have a self hosted marketplace product.
|
|
||||||
|
|
||||||
## Where are extensions stored?
|
## Where are extensions stored?
|
||||||
|
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ sed -i.bak 's/auth: password/auth: none/' ~/.config/code-server/config.yaml
|
|||||||
Restart `code-server` with (assuming you followed the guide):
|
Restart `code-server` with (assuming you followed the guide):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
systemctl --user restart code-server
|
sudo systemctl restart code-server@$USER
|
||||||
```
|
```
|
||||||
|
|
||||||
Now forward local port 8080 to `127.0.0.1:8080` on the remote instance.
|
Now forward local port 8080 to `127.0.0.1:8080` on the remote instance.
|
||||||
@@ -277,7 +277,7 @@ sudo setcap cap_net_bind_service=+ep /usr/lib/code-server/lib/node
|
|||||||
Assuming you have been following the guide, restart `code-server` with:
|
Assuming you have been following the guide, restart `code-server` with:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
systemctl --user restart code-server
|
sudo systemctl restart code-server@$USER
|
||||||
```
|
```
|
||||||
|
|
||||||
Edit your instance and checkmark the allow HTTPS traffic option.
|
Edit your instance and checkmark the allow HTTPS traffic option.
|
||||||
@@ -295,7 +295,7 @@ Edit the `password` field in the `code-server` config file at `~/.config/code-se
|
|||||||
and then restart `code-server` with:
|
and then restart `code-server` with:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
systemctl --user restart code-server
|
sudo systemctl restart code-server@$USER
|
||||||
```
|
```
|
||||||
|
|
||||||
### How do I securely access development web services?
|
### How do I securely access development web services?
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ commands presented in the rest of this document.
|
|||||||
```bash
|
```bash
|
||||||
curl -fOL https://github.com/cdr/code-server/releases/download/v3.4.1/code-server_3.4.1_amd64.deb
|
curl -fOL https://github.com/cdr/code-server/releases/download/v3.4.1/code-server_3.4.1_amd64.deb
|
||||||
sudo dpkg -i code-server_3.4.1_amd64.deb
|
sudo dpkg -i code-server_3.4.1_amd64.deb
|
||||||
systemctl --user enable --now code-server
|
sudo systemctl enable --now code-server@$USER
|
||||||
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
|
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -90,7 +90,7 @@ systemctl --user enable --now code-server
|
|||||||
```bash
|
```bash
|
||||||
curl -fOL https://github.com/cdr/code-server/releases/download/v3.4.1/code-server-3.4.1-amd64.rpm
|
curl -fOL https://github.com/cdr/code-server/releases/download/v3.4.1/code-server-3.4.1-amd64.rpm
|
||||||
sudo rpm -i code-server-3.4.1-amd64.rpm
|
sudo rpm -i code-server-3.4.1-amd64.rpm
|
||||||
systemctl --user enable --now code-server
|
sudo systemctl enable --now code-server@$USER
|
||||||
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
|
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -99,7 +99,7 @@ systemctl --user enable --now code-server
|
|||||||
```bash
|
```bash
|
||||||
# Installs code-server from the AUR using yay.
|
# Installs code-server from the AUR using yay.
|
||||||
yay -S code-server
|
yay -S code-server
|
||||||
systemctl --user enable --now code-server
|
sudo systemctl enable --now code-server@$USER
|
||||||
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
|
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -108,7 +108,7 @@ systemctl --user enable --now code-server
|
|||||||
git clone https://aur.archlinux.org/code-server.git
|
git clone https://aur.archlinux.org/code-server.git
|
||||||
cd code-server
|
cd code-server
|
||||||
makepkg -si
|
makepkg -si
|
||||||
systemctl --user enable --now code-server
|
sudo systemctl enable --now code-server@$USER
|
||||||
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
|
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ echo_systemd_postinstall() {
|
|||||||
echoh
|
echoh
|
||||||
cath << EOF
|
cath << EOF
|
||||||
To have systemd start code-server now and restart on boot:
|
To have systemd start code-server now and restart on boot:
|
||||||
systemctl --user enable --now code-server
|
sudo systemctl enable --now code-server@$USER
|
||||||
Or, if you don't want/need a background service you can run:
|
Or, if you don't want/need a background service you can run:
|
||||||
code-server
|
code-server
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ export enum HttpCode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class HttpError extends Error {
|
export class HttpError extends Error {
|
||||||
constructor(message: string, public readonly code: number) {
|
public constructor(message: string, public readonly code: number, public readonly details?: object) {
|
||||||
super(message)
|
super(message)
|
||||||
this.name = this.constructor.name
|
this.name = this.constructor.name
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user