From 1578ac1924f745d2af3f1295edea6bd259b423ca Mon Sep 17 00:00:00 2001 From: okxlin Date: Wed, 28 Jun 2023 03:01:24 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=B7=BB=E5=8A=A0code-server=E5=88=B0?= =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/code-server/4.14.0/.env.sample | 5 ++ apps/code-server/4.14.0/data.yml | 33 +++++++++ apps/code-server/4.14.0/docker-compose.yml | 25 +++++++ apps/code-server/README.md | 78 +++++++++++++++++++++ apps/code-server/data.yml.bak | 20 ++++++ apps/code-server/latest/.env.sample | 5 ++ apps/code-server/latest/data.yml | 33 +++++++++ apps/code-server/latest/docker-compose.yml | 25 +++++++ apps/code-server/logo.png | Bin 0 -> 4492 bytes 9 files changed, 224 insertions(+) create mode 100644 apps/code-server/4.14.0/.env.sample create mode 100644 apps/code-server/4.14.0/data.yml create mode 100644 apps/code-server/4.14.0/docker-compose.yml create mode 100644 apps/code-server/README.md create mode 100644 apps/code-server/data.yml.bak create mode 100644 apps/code-server/latest/.env.sample create mode 100644 apps/code-server/latest/data.yml create mode 100644 apps/code-server/latest/docker-compose.yml create mode 100644 apps/code-server/logo.png diff --git a/apps/code-server/4.14.0/.env.sample b/apps/code-server/4.14.0/.env.sample new file mode 100644 index 00000000..53ac6d36 --- /dev/null +++ b/apps/code-server/4.14.0/.env.sample @@ -0,0 +1,5 @@ +CONTAINER_NAME="code-server" +PANEL_APP_PORT_HTTP="40031" +DATA_PATH="./data" +WEB_PASSWORD="web_passowrd" +SUDO_PASSWORD="sudo_password" \ No newline at end of file diff --git a/apps/code-server/4.14.0/data.yml b/apps/code-server/4.14.0/data.yml new file mode 100644 index 00000000..a5d56807 --- /dev/null +++ b/apps/code-server/4.14.0/data.yml @@ -0,0 +1,33 @@ +additionalProperties: + formFields: + - default: 40031 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: Port + labelZh: 端口 + required: true + rule: paramPort + type: number + - default: ./data + edit: true + envKey: DATA_PATH + labelEn: Data folder path + labelZh: 数据文件夹路径 + required: true + type: text + - default: code + envKey: WEB_PASSWORD + labelEn: Web access password + labelZh: 网页访问密码 + random: true + required: true + rule: paramComplexity + type: password + - default: code + envKey: SUDO_PASSWORD + labelEn: sudo password + labelZh: sudo密码 + random: true + required: true + rule: paramComplexity + type: password diff --git a/apps/code-server/4.14.0/docker-compose.yml b/apps/code-server/4.14.0/docker-compose.yml new file mode 100644 index 00000000..c0a7c797 --- /dev/null +++ b/apps/code-server/4.14.0/docker-compose.yml @@ -0,0 +1,25 @@ +version: '3' +services: + onenav: + container_name: ${CONTAINER_NAME} + restart: always + networks: + - 1panel-network + ports: + - "${PANEL_APP_PORT_HTTP}:8443" + volumes: + - "${DATA_PATH}:/config" + environment: + - PUID=1000 + - PGID=1000 + - TZ=Asia/Shanghai + - PASSWORD=${WEB_PASSWORD} + - SUDO_PASSWORD=${SUDO_PASSWORD} + - DEFAULT_WORKSPACE=/config/workspace + image: linuxserver/code-server:4.14.0 + labels: + createdBy: "Apps" + +networks: + 1panel-network: + external: true diff --git a/apps/code-server/README.md b/apps/code-server/README.md new file mode 100644 index 00000000..9bd9aa57 --- /dev/null +++ b/apps/code-server/README.md @@ -0,0 +1,78 @@ +# code-server + +[!["GitHub Discussions"](https://img.shields.io/badge/%20GitHub-%20Discussions-gray.svg?longCache=true&logo=github&colorB=purple)](https://github.com/coder/code-server/discussions) [!["Join us on Slack"](https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=brightgreen)](https://coder.com/community) [![Twitter Follow](https://img.shields.io/twitter/follow/CoderHQ?label=%40CoderHQ&style=social)](https://twitter.com/coderhq) [![codecov](https://codecov.io/gh/coder/code-server/branch/main/graph/badge.svg?token=5iM9farjnC)](https://codecov.io/gh/coder/code-server) [![See latest](https://img.shields.io/static/v1?label=Docs&message=see%20latest&color=blue)](https://coder.com/docs/code-server/latest) + +Run [VS Code](https://github.com/Microsoft/vscode) on any machine anywhere and +access it in the browser. + +![Screenshot](./assets/screenshot.png) + +## Highlights + +- Code on any device with a consistent development environment +- Use cloud servers to speed up tests, compilations, downloads, and more +- Preserve battery life when you're on the go; all intensive tasks run on your + server + +## Requirements + +See [requirements](https://coder.com/docs/code-server/latest/requirements) for minimum specs, as well as instructions +on how to set up a Google VM on which you can install code-server. + +**TL;DR:** Linux machine with WebSockets enabled, 1 GB RAM, and 2 vCPUs + +## Getting started + +There are four ways to get started: + +1. Using the [install + script](https://github.com/coder/code-server/blob/main/install.sh), which + automates most of the process. The script uses the system package manager if + possible. +2. Manually [installing + code-server](https://coder.com/docs/code-server/latest/install) +3. Deploy code-server to your team with [coder/coder](https://cdr.co/coder-github) +4. Using our one-click buttons and guides to [deploy code-server to a cloud + provider](https://github.com/coder/deploy-code-server) ⚡ + +If you use the install script, you can preview what occurs during the install +process: + +```bash +curl -fsSL https://code-server.dev/install.sh | sh -s -- --dry-run +``` + +To install, run: + +```bash +curl -fsSL https://code-server.dev/install.sh | sh +``` + +When done, the install script prints out instructions for running and starting +code-server. + +> **Note** +> To manage code-server for a team on your infrastructure, see: [coder/coder](https://cdr.co/coder-github) + +We also have an in-depth [setup and +configuration](https://coder.com/docs/code-server/latest/guide) guide. + +## Questions? + +See answers to [frequently asked +questions](https://coder.com/docs/code-server/latest/FAQ). + +## Want to help? + +See [Contributing](https://coder.com/docs/code-server/latest/CONTRIBUTING) for +details. + +## Hiring + +Interested in [working at Coder](https://coder.com/careers)? Check out [our open +positions](https://coder.com/careers#openings)! + +## For Organizations + +Want remote development for your organization or enterprise? Visit [our +website](https://coder.com) to learn more about Coder. diff --git a/apps/code-server/data.yml.bak b/apps/code-server/data.yml.bak new file mode 100644 index 00000000..ae1bd7ae --- /dev/null +++ b/apps/code-server/data.yml.bak @@ -0,0 +1,20 @@ +name: code-server +tags: + - 工具 +title: 在任何地方的任何计算机上运行VS Code并在浏览器中访问它 +type: 工具 +description: 在任何地方的任何计算机上运行VS Code并在浏览器中访问它 +additionalProperties: + key: code-server + name: code-server + tags: + - Tool + shortDescZh: 在任何地方的任何计算机上运行VS Code并在浏览器中访问它 + shortDescEn: Run VS Code on any machine anywhere and access it in the browser + type: tool + crossVersionUpdate: true + limit: 0 + recommend: 0 + website: https://coder.com/ + github: https://github.com/coder/code-server + document: https://coder.com/docs/code-server/latest \ No newline at end of file diff --git a/apps/code-server/latest/.env.sample b/apps/code-server/latest/.env.sample new file mode 100644 index 00000000..53ac6d36 --- /dev/null +++ b/apps/code-server/latest/.env.sample @@ -0,0 +1,5 @@ +CONTAINER_NAME="code-server" +PANEL_APP_PORT_HTTP="40031" +DATA_PATH="./data" +WEB_PASSWORD="web_passowrd" +SUDO_PASSWORD="sudo_password" \ No newline at end of file diff --git a/apps/code-server/latest/data.yml b/apps/code-server/latest/data.yml new file mode 100644 index 00000000..a5d56807 --- /dev/null +++ b/apps/code-server/latest/data.yml @@ -0,0 +1,33 @@ +additionalProperties: + formFields: + - default: 40031 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: Port + labelZh: 端口 + required: true + rule: paramPort + type: number + - default: ./data + edit: true + envKey: DATA_PATH + labelEn: Data folder path + labelZh: 数据文件夹路径 + required: true + type: text + - default: code + envKey: WEB_PASSWORD + labelEn: Web access password + labelZh: 网页访问密码 + random: true + required: true + rule: paramComplexity + type: password + - default: code + envKey: SUDO_PASSWORD + labelEn: sudo password + labelZh: sudo密码 + random: true + required: true + rule: paramComplexity + type: password diff --git a/apps/code-server/latest/docker-compose.yml b/apps/code-server/latest/docker-compose.yml new file mode 100644 index 00000000..5fd555fb --- /dev/null +++ b/apps/code-server/latest/docker-compose.yml @@ -0,0 +1,25 @@ +version: '3' +services: + onenav: + container_name: ${CONTAINER_NAME} + restart: always + networks: + - 1panel-network + ports: + - "${PANEL_APP_PORT_HTTP}:8443" + volumes: + - "${DATA_PATH}:/config" + environment: + - PUID=1000 + - PGID=1000 + - TZ=Asia/Shanghai + - PASSWORD=${WEB_PASSWORD} + - SUDO_PASSWORD=${SUDO_PASSWORD} + - DEFAULT_WORKSPACE=/config/workspace + image: linuxserver/code-server:latest + labels: + createdBy: "Apps" + +networks: + 1panel-network: + external: true diff --git a/apps/code-server/logo.png b/apps/code-server/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..16bb3b2e4424596547e3fb0f586f1e550fce6c54 GIT binary patch literal 4492 zcmdT|hd)*S|3@M+vSp8qa?OluUdhS|g^X)fu03;+@v*X3k?ooxncYjc=C#Sp-ch-( z%eBe+p8kv9?>rvw^M0K19_KZl&*$sJ8X9O(Q?gMK5fM>8(N;GGdgQ-$iwrm`e;q$0ScB4-Zd+mf>6isSJbX zjVMqO|A>0(Hy$3J{B@F_J1-w4>gsvw{QzlpX0FDv@^d{`8SGd zl)$@%!wFOjeg96a9C+yed)HTi6KNs3v(ir6YAyZ*YG0_DqgrTadrDYim2>BKM?)Q+ zoJ_m8xM*uPekG26|DJw0n`z;@iAsapf@x%AB=S6~)3zf|5pD>DCJto`8NTpmD=p2i zm0)dd(pfVs2&k>CRrNi5KAd$xOU1e>`bHl5+Rly`4u^khX>mB*9Dh-3tMbEH#t;9O z-rU^$b->XlNolPI>6GT?K%b#|CQ4yDYftIKm;D2)drjOOCv!gJG5 zHatAMM67gyl#J}>YA5LQ{QL=&Qk-$q04y)htE@~tGBRSEF@ev`%d2~P;{L65_4miJO1+Hv@yb&zY)92~ z8&sj2l6ZRRU!l7iN#Yi1T+tm#!B8UhShhDg^pciA(_1}EwrgdDTTDz07|u>ZL-Sg4 zyC9Z{zu7y!y1JSsDk{pb(xafFf}+u5g}GKLWMX2%>y$tT?6lAZ!qnB(rPtQ3%Oj%i3^;xeJeSQx=3~i{b?bsOjQ0Km6F*`d;*c##x zOcNf{1WbCMA}H{Rss8I%jdD#eSp@Oi+}s#UdbY`jyv9LUSy|(=4wwHjcnsf7N+g}1pC5Yu`r=>|J&#a4amXO4GF_24 zn-w~pcBK&>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