Initial version

master
Dennis Schwerdel 2021-04-14 20:22:51 +02:00
commit 76ad8d62bd
10 changed files with 117 additions and 0 deletions

4
.dockerignore Normal file
View File

@ -0,0 +1,4 @@
test/*
.git/*
screenshots/*

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
node_modules/

2
CHANGELOG Normal file
View File

@ -0,0 +1,2 @@
[0.1.0]
* First version

27
CloudronManifest.json Normal file
View File

@ -0,0 +1,27 @@
{
"id": "com.coder.codeserver.cloudronapp",
"title": "VS Code",
"author": "Dennis Schwerdel",
"description": "file://DESCRIPTION.md",
"tagline": "Visual Studio Code in the browser",
"tags": [
],
"version": "3.9.3",
"healthCheckPath": "/healthz",
"httpPort": 8080,
"manifestVersion": 1,
"website": "https://github.com/cdr/code-server",
"contactEmail": "support@cloudron.io",
"icon": "logo.png",
"addons": {
"localstorage": {}
},
"capabilities": [
],
"minBoxVersion": "1.8.1",
"tcpPorts": {},
"udpPorts": {},
"mediaLinks": [
],
"changelog": "file://CHANGELOG"
}

3
DESCRIPTION.md Normal file
View File

@ -0,0 +1,3 @@
### VS Code
Run VS Code on any machine anywhere and access it in the browser.

21
Dockerfile Normal file
View File

@ -0,0 +1,21 @@
FROM cloudron/base:3.0.0
MAINTAINER Dennis Schwerdel <schwerdel@googlemail.com>
ENV VERSION=3.9.3
RUN mkdir -p /app/code
WORKDIR /app/code
RUN curl -fsSL https://code-server.dev/install.sh | sh -s -- --version ${VERSION}
ADD config.yaml /app/code/default-config.yaml
RUN mv /home/cloudron /app/code/default-home \
&& ln -s /app/data /home/cloudron
WORKDIR /app/data
ENV HOME=/app/data
ADD start.sh /app/code/start.sh
CMD [ "/app/code/start.sh" ]

24
README.md Normal file
View File

@ -0,0 +1,24 @@
# VS Code Cloudron App
This repository contains the Cloudron app package source for VS Code.
## Installation
[![Install](https://cloudron.io/img/button.svg)](https://cloudron.io/button.html?app=com.coder.code-server.cloudronapp)
or using the [Cloudron command line tooling](https://cloudron.io/references/cli.html)
```
cloudron install --appstore-id com.coder.code-server.cloudronapp
```
## Building
The app package can be built using the [Cloudron command line tooling](https://cloudron.io/references/cli.html).
```
cd vscode-app
cloudron build
cloudron install
```

4
config.yaml Normal file
View File

@ -0,0 +1,4 @@
bind-addr: 0.0.0.0:8080
auth: password
password: %PASSWORD%
cert: false

BIN
logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

30
start.sh Executable file
View File

@ -0,0 +1,30 @@
#!/bin/bash
set -eu
mkdir -p /app/data/vscode/{config,data} /app/data/{.config,.local/share}
for file in $(ls /app/code/default-home -A); do
if ! [ -f /app/data/$file ]; then
cp -a /app/code/default-home/$file /app/data/$file
fi
done
if ! [ -e /app/data/.config/code-server ]; then
ln -s /app/data/vscode/config /app/data/.config/code-server
fi
if ! [ -e /app/data/.local/share/code-server ]; then
ln -s /app/data/vscode/data /app/data/.local/share/code-server
fi
if ! [ -f /app/data/vscode/config/config.yaml ]; then
cp /app/code/default-config.yaml /app/data/vscode/config/config.yaml
PASSWORD=$(dd if=/dev/urandom bs=1 count=12 2>/dev/null | base64)
sed -i "s/%PASSWORD%/${PASSWORD}/g" /app/data/vscode/config/config.yaml
echo "Generated random password: ${PASSWORD}"
fi
chown -R cloudron: /app/data
grep -e '^password' --color=never /app/data/vscode/config/config.yaml
exec sudo -u cloudron code-server