diff --git a/workspaces/base-devspace/Dockerfile b/workspaces/base-devspace/Dockerfile new file mode 100755 index 0000000..72bc7f1 --- /dev/null +++ b/workspaces/base-devspace/Dockerfile @@ -0,0 +1,43 @@ +ARG docker_registry=docker.io/alnoda +ARG image_tag=20.04-3.0 + +FROM ${docker_registry}/ubuntu-workspace:${image_tag} + +USER root + +################################################################# TOOLS: cronicle, filebrowser, ungit, static server + +COPY supervisord-devspace.conf /etc/supervisord/ +COPY filebrowser.json /opt/filebrowser/.filebrowser.json + +COPY mkdocs /home/docs +COPY mkdocs-requirements.txt /home/abc/installed-python-packages/mkdocs-requirements.txt + +RUN apt-get -y update \ + && echo "------------------------------------------------------ filebrowser" \ + && cd /tmp && wget https://github.com/filebrowser/filebrowser/releases/download/v2.21.1/linux-amd64-filebrowser.tar.gz \ + && mkdir /tmp/filebrowser \ + && tar xvf /tmp/linux-amd64-filebrowser.tar.gz -C /tmp/filebrowser \ + && chmod +x /tmp/filebrowser/filebrowser \ + && mv /tmp/filebrowser/filebrowser /opt/filebrowser/ \ + && rm -rf /tmp/filebrowser/filebrowser \ + && echo "------------------------------------------------------ ungit" \ + && apt-get install -y ssh net-tools --no-install-recommends \ + && mkdir -p /opt/ungit \ + && cd /opt/ungit && nodeenv --node=12.18.3 --npm=6.0.0 env \ + && cd /opt/ungit && . env/bin/activate && npm install -g ungit@1.5.9 \ + && echo "------------------------------------------------------ mkdocs" \ + && pip install -r /home/abc/installed-python-packages/mkdocs-requirements.txt \ + && echo "------------------------------------------------------ user" \ + && chown -R abc /opt/filebrowser \ + && chown -R abc /home/docs \ + && chown -R abc /opt/ungit \ + && mkdir -p /var/log/filebrowser && chown -R abc /var/log/filebrowser \ + && mkdir -p /var/log/ungit && chown -R abc /var/log/ungit \ + && mkdir -p /var/log/mkdocs && chown -R abc /var/log/mkdocs \ + && chown -R abc /home/abc/utils \ + && chown -R abc /home/abc/installed-python-packages \ + && find /home -type d | xargs -I{} chown -R abc {} \ + && find /home -type f | xargs -I{} chown abc {} + +USER abc \ No newline at end of file diff --git a/workspaces/base-devspace/README.md b/workspaces/base-devspace/README.md new file mode 100644 index 0000000..170e5e5 --- /dev/null +++ b/workspaces/base-devspace/README.md @@ -0,0 +1,33 @@ +# Base-devspace + +Template for other coding workspaces. + +## Start + +``` +docker run --name space-1 --user=root -d -p 8020-8040:8020-8040 alnoda/base-devspace +``` + +open [localhost:8020](http://localhost:8020) in browser. + +## Features + +- [**FileBrowser**](./features.md#filebrowser) - manage files and folders inside the workspace, and exchange data between local environment and the workspace +- **Terminal** - Full-fledged browser-based terminal with Z-shell. +- [**Static File Server**](./features.md#static-file-server) - view any static html sites as easy as if you do it on your local machine. Serve static websites easily. +- [**Ungit**](./features.md#ungit) - rings user friendliness to git without sacrificing the versatility of it. +- Quicklaunch UI with getting started tutorial +- **Ubuntu 20.4** with the following CLI apps + - [Zsh](https://www.zsh.org/), [Oh my Zsh](https://ohmyz.sh/) + - Python 3, Pip + - Node/nodeenv + - curl, wget, telnet, jq + - **Git:** git, git-flow, lazygit + - **File browsers:** mc + - **Text editors:** nano, vim, mcedit + - **System monitors:** ncdu, htop, glances, vizex + - **Process Control:** supervisord + - **Job scheduler:** cron + - **Terminal multiplexer:** tmux + + diff --git a/workspaces/base-devspace/filebrowser.json b/workspaces/base-devspace/filebrowser.json new file mode 100755 index 0000000..054efbf --- /dev/null +++ b/workspaces/base-devspace/filebrowser.json @@ -0,0 +1,16 @@ +{ + "port": 8021, + "baseURL": "", + "address": "0.0.0.0", + "log": "stdout", + "database": "/opt/filebrowser/database.db", + "root": "/home", + "allowEdit": true, + "allowNew": true, + "allowCommands": true, + "commands": ["apt", "ls", "cd", "rm", "cp", "mv", "cat", "echo", "tar", "zip", "unzip"], + "noAuth": true, + "auth": { + "method": "noauth" + } +} \ No newline at end of file diff --git a/workspaces/base-devspace/mkdocs-requirements.txt b/workspaces/base-devspace/mkdocs-requirements.txt new file mode 100644 index 0000000..b8bcfe4 --- /dev/null +++ b/workspaces/base-devspace/mkdocs-requirements.txt @@ -0,0 +1,4 @@ +mkdocs-material==8.2.14 +mkdocs-material-extensions==1.0.3 +mkdocs-macros-plugin==0.7.0 +mkdocs-multirepo-plugin==0.3.5 \ No newline at end of file diff --git a/workspaces/base-devspace/mkdocs/.gitignore b/workspaces/base-devspace/mkdocs/.gitignore new file mode 100644 index 0000000..c9bd680 --- /dev/null +++ b/workspaces/base-devspace/mkdocs/.gitignore @@ -0,0 +1,68 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ + +# Translations +*.mo + +# Scrapy stuff: +.scrapy + +# PyBuilder +target/ + +# IPython Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# virtualenv +venv/ +ENV/ + +# MkDocs documentation +site/ \ No newline at end of file diff --git a/workspaces/base-devspace/mkdocs/docs/README.md b/workspaces/base-devspace/mkdocs/docs/README.md new file mode 100644 index 0000000..7ce512c --- /dev/null +++ b/workspaces/base-devspace/mkdocs/docs/README.md @@ -0,0 +1,100 @@ + + + +{% + set tools = [ + { + "env": "TERMINAL_URL", + "name": "Terminal", + "image": "assets/home/Terminal.png", + "description": "Full-fledged WEB-based Command Line Interface" + }, + { + "env": "FILEBROWSER_URL", + "name": "File Browser", + "image": "assets/home/Filebrowser.png", + "description": "Browse, upload and download files and folders to and from the Workspace" + }, + { + "env": "UNGIT_URL", + "name": "Ungit", + "image": "assets/home/Ungit.jpg", + "description": "Manage Git repositories and work flow using beautiful UI" + } + ] +%} + + +
+ {% for tool in tools %} + {% set tool_url = get_tool_url(tool.env) %} +
+ + + + +
{{ tool.name }}
+
+
{{ tool.description }}
+
+ {% endfor %} +
+ + + + + diff --git a/workspaces/base-devspace/mkdocs/docs/about.md b/workspaces/base-devspace/mkdocs/docs/about.md new file mode 100644 index 0000000..a4d6c19 --- /dev/null +++ b/workspaces/base-devspace/mkdocs/docs/about.md @@ -0,0 +1 @@ +This workspace - is a template for other coding workspaces. \ No newline at end of file diff --git a/workspaces/base-devspace/mkdocs/docs/assets/Alnoda-logo.svg b/workspaces/base-devspace/mkdocs/docs/assets/Alnoda-logo.svg new file mode 100644 index 0000000..db53f4c --- /dev/null +++ b/workspaces/base-devspace/mkdocs/docs/assets/Alnoda-logo.svg @@ -0,0 +1,70 @@ + + + +Created with Fabric.js 3.6.3 + + + + + \ No newline at end of file diff --git a/workspaces/base-devspace/mkdocs/docs/assets/favicon.ico b/workspaces/base-devspace/mkdocs/docs/assets/favicon.ico new file mode 100644 index 0000000..2c8bed5 Binary files /dev/null and b/workspaces/base-devspace/mkdocs/docs/assets/favicon.ico differ diff --git a/workspaces/base-devspace/mkdocs/docs/assets/home/Cronicle.jpg b/workspaces/base-devspace/mkdocs/docs/assets/home/Cronicle.jpg new file mode 100644 index 0000000..03c56be Binary files /dev/null and b/workspaces/base-devspace/mkdocs/docs/assets/home/Cronicle.jpg differ diff --git a/workspaces/base-devspace/mkdocs/docs/assets/home/Filebrowser.png b/workspaces/base-devspace/mkdocs/docs/assets/home/Filebrowser.png new file mode 100644 index 0000000..f4b5700 Binary files /dev/null and b/workspaces/base-devspace/mkdocs/docs/assets/home/Filebrowser.png differ diff --git a/workspaces/base-devspace/mkdocs/docs/assets/home/Htop.jpg b/workspaces/base-devspace/mkdocs/docs/assets/home/Htop.jpg new file mode 100644 index 0000000..994bc13 Binary files /dev/null and b/workspaces/base-devspace/mkdocs/docs/assets/home/Htop.jpg differ diff --git a/workspaces/base-devspace/mkdocs/docs/assets/home/MC.jpg b/workspaces/base-devspace/mkdocs/docs/assets/home/MC.jpg new file mode 100644 index 0000000..9b0a92a Binary files /dev/null and b/workspaces/base-devspace/mkdocs/docs/assets/home/MC.jpg differ diff --git a/workspaces/base-devspace/mkdocs/docs/assets/home/MkDocs.png b/workspaces/base-devspace/mkdocs/docs/assets/home/MkDocs.png new file mode 100755 index 0000000..333cb6c Binary files /dev/null and b/workspaces/base-devspace/mkdocs/docs/assets/home/MkDocs.png differ diff --git a/workspaces/base-devspace/mkdocs/docs/assets/home/Static-server.png b/workspaces/base-devspace/mkdocs/docs/assets/home/Static-server.png new file mode 100644 index 0000000..4d8fa6b Binary files /dev/null and b/workspaces/base-devspace/mkdocs/docs/assets/home/Static-server.png differ diff --git a/workspaces/base-devspace/mkdocs/docs/assets/home/Terminal.png b/workspaces/base-devspace/mkdocs/docs/assets/home/Terminal.png new file mode 100644 index 0000000..9ccb947 Binary files /dev/null and b/workspaces/base-devspace/mkdocs/docs/assets/home/Terminal.png differ diff --git a/workspaces/base-devspace/mkdocs/docs/assets/home/Ungit.jpg b/workspaces/base-devspace/mkdocs/docs/assets/home/Ungit.jpg new file mode 100644 index 0000000..c09223c Binary files /dev/null and b/workspaces/base-devspace/mkdocs/docs/assets/home/Ungit.jpg differ diff --git a/workspaces/base-devspace/mkdocs/docs/assets/laptop-circle-l.svg b/workspaces/base-devspace/mkdocs/docs/assets/laptop-circle-l.svg new file mode 100644 index 0000000..f007ed4 --- /dev/null +++ b/workspaces/base-devspace/mkdocs/docs/assets/laptop-circle-l.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/workspaces/base-devspace/mkdocs/docs/assets/laptop-circle-white-l.svg b/workspaces/base-devspace/mkdocs/docs/assets/laptop-circle-white-l.svg new file mode 100644 index 0000000..8575399 --- /dev/null +++ b/workspaces/base-devspace/mkdocs/docs/assets/laptop-circle-white-l.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/workspaces/base-devspace/mkdocs/docs/assets/laptop-circle-white.svg b/workspaces/base-devspace/mkdocs/docs/assets/laptop-circle-white.svg new file mode 100644 index 0000000..fe38fa6 --- /dev/null +++ b/workspaces/base-devspace/mkdocs/docs/assets/laptop-circle-white.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/workspaces/base-devspace/mkdocs/docs/assets/laptop-circle.svg b/workspaces/base-devspace/mkdocs/docs/assets/laptop-circle.svg new file mode 100644 index 0000000..6a97043 --- /dev/null +++ b/workspaces/base-devspace/mkdocs/docs/assets/laptop-circle.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/workspaces/base-devspace/mkdocs/docs/javascript/config.js b/workspaces/base-devspace/mkdocs/docs/javascript/config.js new file mode 100644 index 0000000..06dbf38 --- /dev/null +++ b/workspaces/base-devspace/mkdocs/docs/javascript/config.js @@ -0,0 +1,16 @@ +window.MathJax = { + tex: { + inlineMath: [["\\(", "\\)"]], + displayMath: [["\\[", "\\]"]], + processEscapes: true, + processEnvironments: true + }, + options: { + ignoreHtmlClass: ".*|", + processHtmlClass: "arithmatex" + } +}; + +document$.subscribe(() => { + MathJax.typesetPromise() +}) diff --git a/workspaces/base-devspace/mkdocs/docs/pages/my-apps.md b/workspaces/base-devspace/mkdocs/docs/pages/my-apps.md new file mode 100644 index 0000000..5066a8d --- /dev/null +++ b/workspaces/base-devspace/mkdocs/docs/pages/my-apps.md @@ -0,0 +1,100 @@ + + + +{% + set tools = [ + { + "env": "PORT_8038", + "name": "Port 8038", + "image": "port-8038.png", + "description": "My app running on port 8038" + }, + { + "env": "PORT_8039", + "name": "Port 8039", + "image": "port-8039.png", + "description": "My app running on port 8039" + }, + { + "env": "PORT_8040", + "name": "Port 8040", + "image": "port-8040.png", + "description": "My app running on port 8040" + } + ] +%} + + +
+ {% for tool in tools %} + {% set tool_url = get_tool_url(tool.env) %} +
+ + + + +
{{ tool.name }}
+
+
{{ tool.description }}
+
+ {% endfor %} +
+ + + + + diff --git a/workspaces/base-devspace/mkdocs/docs/pages/my-apps/port-8038.png b/workspaces/base-devspace/mkdocs/docs/pages/my-apps/port-8038.png new file mode 100644 index 0000000..bca17d7 Binary files /dev/null and b/workspaces/base-devspace/mkdocs/docs/pages/my-apps/port-8038.png differ diff --git a/workspaces/base-devspace/mkdocs/docs/pages/my-apps/port-8039.png b/workspaces/base-devspace/mkdocs/docs/pages/my-apps/port-8039.png new file mode 100644 index 0000000..2d82aeb Binary files /dev/null and b/workspaces/base-devspace/mkdocs/docs/pages/my-apps/port-8039.png differ diff --git a/workspaces/base-devspace/mkdocs/docs/pages/my-apps/port-8040.png b/workspaces/base-devspace/mkdocs/docs/pages/my-apps/port-8040.png new file mode 100644 index 0000000..2457aba Binary files /dev/null and b/workspaces/base-devspace/mkdocs/docs/pages/my-apps/port-8040.png differ diff --git a/workspaces/base-devspace/mkdocs/docs/stylesheets/extra.css b/workspaces/base-devspace/mkdocs/docs/stylesheets/extra.css new file mode 100644 index 0000000..62a4bd0 --- /dev/null +++ b/workspaces/base-devspace/mkdocs/docs/stylesheets/extra.css @@ -0,0 +1,19 @@ +[data-md-color-scheme="devspace"] { + --md-primary-fg-color: #90030C; + --md-primary-fg-color--light: #90030C; + --md-primary-fg-color--dark: #90030C; + --md-accent-fg-color: #f0980c; +} + +[data-md-color-scheme="devspace-dark"] { + --md-primary-fg-color: #e31220; + --md-primary-fg-color--light: #e31220; + --md-primary-fg-color--dark: #e31220; + --md-accent-fg-color: #f0980c; + + --md-default-bg-color: #2E303E; + --md-default-fg-color--light: #E9EBFC; + --md-typeset-color: #E9EBFC; + --md-typeset-a-color: #E9EBFC; +} + diff --git a/workspaces/base-devspace/mkdocs/macros/helpers.py b/workspaces/base-devspace/mkdocs/macros/helpers.py new file mode 100644 index 0000000..bcaa645 --- /dev/null +++ b/workspaces/base-devspace/mkdocs/macros/helpers.py @@ -0,0 +1,57 @@ +""" +Basic example of a Mkdocs-macros module. +Include this {{ macros_info() }} in any page to get complete macro info +""" +import os + +port_increments = { + "DOCS_URL": 0, + "FILEBROWSER_URL": 1, + "UNGIT_URL": 4, + "TERMINAL_URL": 6, + "PORT_8038": 18, + "PORT_8039": 19, + "PORT_8040": 20 + } + + + +# this function name should not be changed +def define_env(env): + """ + This is the hook for defining variables, macros and filters + - variables: the dictionary that contains the environment variables + - macro: a decorator function, to declare a macro. + - filter: a function with one of more arguments, + used to perform a transformation + """ + @env.macro + def get_tool_url(env): + try: + return os.environ[env] + except: + # Get host + host = "localhost" + try: + host = os.environ["WRK_HOST"] + except: + pass + proto = "http" + try: + proto = os.environ["WRK_PROTO"] + except: + pass + # Entry port - port relative to which other ports will be calculated + entry_port = 8020 + try: + entry_port = int(os.environ["ENTRY_PORT"]) + except: + pass + # Assign port + try: + port = port_increments[env] + entry_port + except: + port = 80 + return f"{proto}://{host}:{port}" + + \ No newline at end of file diff --git a/workspaces/base-devspace/mkdocs/mkdocs.yml b/workspaces/base-devspace/mkdocs/mkdocs.yml new file mode 100644 index 0000000..634fa41 --- /dev/null +++ b/workspaces/base-devspace/mkdocs/mkdocs.yml @@ -0,0 +1,68 @@ +# =========================================================== +# NAVIGATION +# =========================================================== + +nav: + - Home: README.md + - My apps: pages/my-apps.md + - About: about.md + - Docs: https://docs.alnoda.org/base-devspace/ + + +# =========================================================== +# CONFIGURATION +# =========================================================== + +site_name: Workspace +repo_url: https://github.com/bluxmit/alnoda-workspaces +site_url: https://docs.alnoda.org +edit_uri: "" + +# =========================================================== +# APPEARANCE +# =========================================================== + +theme: + name: 'material' + favicon: 'assets/laptop-circle-l.svg' + logo: 'assets/laptop-circle-white-l.svg' + custom_dir: overrides + icon: + repo: fontawesome/brands/github + features: + - navigation.instant + palette: + - scheme: devspace + toggle: + icon: material/brightness-7 + name: Switch to dark mode + - scheme: devspace-dark + toggle: + icon: material/brightness-4 + name: Switch to light mode + +extra: + # Link to open when your logo is clicked + homepage: https://docs.alnoda.org + host_url: http://docs.alnoda.org + +plugins: + # Enable Macros and jinja2 templates + - macros: + module_name: macros/helpers + +extra_css: + - stylesheets/extra.css + +extra_javascript: + - javascripts/config.js + - https://polyfill.io/v3/polyfill.min.js?features=es6 + + + + + + + + + diff --git a/workspaces/base-devspace/mkdocs/overrides/partials/footer.html b/workspaces/base-devspace/mkdocs/overrides/partials/footer.html new file mode 100644 index 0000000..e69de29 diff --git a/workspaces/base-devspace/supervisord-devspace.conf b/workspaces/base-devspace/supervisord-devspace.conf new file mode 100755 index 0000000..c2c6395 --- /dev/null +++ b/workspaces/base-devspace/supervisord-devspace.conf @@ -0,0 +1,25 @@ +[program:mkdocs] +directory=/home/docs +command=/bin/sh -c " mkdocs serve -a 0.0.0.0:8020 " +stderr_logfile = /var/log/mkdocs/mkdocs-stderr.log +stdout_logfile = /var/log/mkdocs/mkdocs-stdout.log +logfile_maxbytes = 1024 + +[program:filebrowser] +directory=/opt/filebrowser +command=/bin/sh -c " /opt/filebrowser/filebrowser " +stderr_logfile = /var/log/filebrowser/filebrowser-stderr.log +stdout_logfile = /var/log/filebrowser/filebrowser-stdout.log +logfile_maxbytes = 1024 + +[program:ungit] +directory=/opt/ungit +command=/bin/sh -c " cd /opt/ungit; . env/bin/activate; ungit --port=8024 --ungitBindIp=0.0.0.0 --launchBrowser=false --autoFetch=false --bugtracking=false --authentication=false " +stderr_logfile = /var/log/ungit/ungit-stderr.log +stdout_logfile = /var/log/ungit/ungit-stdout.log +logfile_maxbytes = 1024 + + + + + diff --git a/workspaces/codeserver-workspace/Dockerfile b/workspaces/codeserver-workspace/Dockerfile index 12e1f71..bd26ae2 100644 --- a/workspaces/codeserver-workspace/Dockerfile +++ b/workspaces/codeserver-workspace/Dockerfile @@ -1,16 +1,13 @@ ARG docker_registry=docker.io/alnoda -ARG image_tag=2.2 +ARG image_tag=3.0 -FROM ${docker_registry}/base-workspace:${image_tag} +FROM ${docker_registry}/base-devspace:${image_tag} USER root COPY supervisord-codeserver.conf /etc/supervisord/ -COPY ./mkdocs/mkdocs.yml /home/docs/mkdocs.yml -COPY ./mkdocs/helpers.py /home/docs/macros -COPY ./mkdocs/IDE.jpg /home/docs/docs/assets/home/ -COPY ./mkdocs/README.md /home/docs/docs/README.md +COPY ./mkdocs/ /home/docs/ RUN echo "------------------------------------------------------ code-server" \ && apt-get install -y build-essential pkg-config \ diff --git a/workspaces/codeserver-workspace/README.md b/workspaces/codeserver-workspace/README.md index 739bb65..888bbf7 100644 --- a/workspaces/codeserver-workspace/README.md +++ b/workspaces/codeserver-workspace/README.md @@ -3,12 +3,9 @@

# Code-server workspace -General-purpose dockerized development environment. Fully isolated inside a docker container. -Includes code editor, terminal, scheduler and filebrowser. -

- Collage -

+General-purpose containerized isolated development environment. +Includes code editor, terminal, filebrowser and git manager. ## Why this images @@ -25,28 +22,23 @@ and open [localhost:8020](http://localhost:8020) in browser. ## Features -- Workspace own UI. Launch all workspace tools from one place. Customize to your yown needs, include docs. - [**Code-server**](https://github.com/cdr/code-server) - open source version of popular Visual Studio Code IDE. Codeserver has VS-Code extensions and works in browser. - [**Terminal**](https://github.com/tsl0922/ttyd) - secure browser-based terminal. - [**FileBrowser**](https://github.com/filebrowser/filebrowser) - manage files and folders inside the workspace, and exchange data between local environment and the workspace -- [**Cronicle**](https://github.com/jhuckaby/Cronicle) - task scheduler and runner, with a web based front-end UI. It handles both scheduled, repeating and on-demand jobs, targeting any number of worker servers, with real-time stats and live log viewer. -- [**Static File Server**](https://github.com/vercel/serve) - view any static html sites as easy as if you do it on your local machine. Serve static websites easily. - [**Ungit**](https://github.com/FredrikNoren/ungit) - rings user friendliness to git without sacrificing the versatility of it. -- [**MkDocs**](https://squidfunk.github.io/mkdocs-material/) - create awesome documentation for your project with only markdown. -- [**Midnight Commander**](https://midnight-commander.org/) - Feature rich visual file manager with internal text viewer and editor. -- [**Process Monitor**](https://htop.dev/) - Monitor running process and resource utilization. - **Ubuntu 20.4** with the following CLI apps - [Zsh](https://www.zsh.org/), [Oh my Zsh](https://ohmyz.sh/) - Python 3, Pip - Node/nodeenv - curl, wget, telnet, jq - **Git:** git, git-flow, lazygit - - **File browsers:** mc, xplr + - **File browsers:** mc - **Text editors:** nano, vim, mcedit - **System monitors:** ncdu, htop, glances, vizex - **Process Control:** supervisord - **Job scheduler:** cron + - **Terminal multiplexer:** tmux ## Docs @@ -55,12 +47,3 @@ See our guides - [**project docs**](https://docs.alnoda.org/) - [**getting started**](https://docs.alnoda.org/get-started/common-features/) -## Demo - -
- Demo: Code-server workspace -
- -

- WID demo -

\ No newline at end of file diff --git a/workspaces/codeserver-workspace/mkdocs/.gitignore b/workspaces/codeserver-workspace/mkdocs/.gitignore new file mode 100644 index 0000000..c9bd680 --- /dev/null +++ b/workspaces/codeserver-workspace/mkdocs/.gitignore @@ -0,0 +1,68 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ + +# Translations +*.mo + +# Scrapy stuff: +.scrapy + +# PyBuilder +target/ + +# IPython Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# virtualenv +venv/ +ENV/ + +# MkDocs documentation +site/ \ No newline at end of file diff --git a/workspaces/codeserver-workspace/mkdocs/README.md b/workspaces/codeserver-workspace/mkdocs/docs/README.md similarity index 73% rename from workspaces/codeserver-workspace/mkdocs/README.md rename to workspaces/codeserver-workspace/mkdocs/docs/README.md index d2dd46c..701005f 100644 --- a/workspaces/codeserver-workspace/mkdocs/README.md +++ b/workspaces/codeserver-workspace/mkdocs/docs/README.md @@ -75,35 +75,11 @@ "image": "assets/home/Filebrowser.png", "description": "Browse, upload and download files and folders to and from the Workspace" }, - { - "env": "CRONICLE_URL", - "name": "Cronicle", - "image": "assets/home/Cronicle.jpg", - "description": "Schedule jobs, manage schedules, observe and monitor executions (user/pass - admin/admin)" - }, { "env": "UNGIT_URL", "name": "Ungit", "image": "assets/home/Ungit.jpg", "description": "Manage Git repositories and work flow using beautiful UI" - }, - { - "env": "STATICFS_URL", - "name": "Static File Server", - "image": "assets/home/Static-server.png", - "description": "Serve any static websites like a breeze" - }, - { - "env": "MC_URL", - "name": "M.Commander", - "image": "assets/home/MC.jpg", - "description": "Feature rich visual file manager with internal text viewer and editor" - }, - { - "env": "HTOP_URL", - "name": "Resource monitor", - "image": "assets/home/Htop.jpg", - "description": "Monitor running process and resource utilization" } ] %} diff --git a/workspaces/codeserver-workspace/mkdocs/docs/about.md b/workspaces/codeserver-workspace/mkdocs/docs/about.md new file mode 100644 index 0000000..651653e --- /dev/null +++ b/workspaces/codeserver-workspace/mkdocs/docs/about.md @@ -0,0 +1,2 @@ +General-purpose containerized isolated development environment. +Includes code editor, terminal, filebrowser and git manager. \ No newline at end of file diff --git a/workspaces/codeserver-workspace/mkdocs/docs/assets/Alnoda-logo.svg b/workspaces/codeserver-workspace/mkdocs/docs/assets/Alnoda-logo.svg new file mode 100644 index 0000000..db53f4c --- /dev/null +++ b/workspaces/codeserver-workspace/mkdocs/docs/assets/Alnoda-logo.svg @@ -0,0 +1,70 @@ + + + +Created with Fabric.js 3.6.3 + + + + + \ No newline at end of file diff --git a/workspaces/codeserver-workspace/mkdocs/docs/assets/favicon.ico b/workspaces/codeserver-workspace/mkdocs/docs/assets/favicon.ico new file mode 100644 index 0000000..2c8bed5 Binary files /dev/null and b/workspaces/codeserver-workspace/mkdocs/docs/assets/favicon.ico differ diff --git a/workspaces/codeserver-workspace/mkdocs/docs/assets/home/Cronicle.jpg b/workspaces/codeserver-workspace/mkdocs/docs/assets/home/Cronicle.jpg new file mode 100644 index 0000000..03c56be Binary files /dev/null and b/workspaces/codeserver-workspace/mkdocs/docs/assets/home/Cronicle.jpg differ diff --git a/workspaces/codeserver-workspace/mkdocs/docs/assets/home/Filebrowser.png b/workspaces/codeserver-workspace/mkdocs/docs/assets/home/Filebrowser.png new file mode 100644 index 0000000..f4b5700 Binary files /dev/null and b/workspaces/codeserver-workspace/mkdocs/docs/assets/home/Filebrowser.png differ diff --git a/workspaces/codeserver-workspace/mkdocs/docs/assets/home/Htop.jpg b/workspaces/codeserver-workspace/mkdocs/docs/assets/home/Htop.jpg new file mode 100644 index 0000000..994bc13 Binary files /dev/null and b/workspaces/codeserver-workspace/mkdocs/docs/assets/home/Htop.jpg differ diff --git a/workspaces/codeserver-workspace/mkdocs/IDE.jpg b/workspaces/codeserver-workspace/mkdocs/docs/assets/home/IDE.jpg similarity index 100% rename from workspaces/codeserver-workspace/mkdocs/IDE.jpg rename to workspaces/codeserver-workspace/mkdocs/docs/assets/home/IDE.jpg diff --git a/workspaces/codeserver-workspace/mkdocs/docs/assets/home/MC.jpg b/workspaces/codeserver-workspace/mkdocs/docs/assets/home/MC.jpg new file mode 100644 index 0000000..9b0a92a Binary files /dev/null and b/workspaces/codeserver-workspace/mkdocs/docs/assets/home/MC.jpg differ diff --git a/workspaces/codeserver-workspace/mkdocs/docs/assets/home/MkDocs.png b/workspaces/codeserver-workspace/mkdocs/docs/assets/home/MkDocs.png new file mode 100755 index 0000000..333cb6c Binary files /dev/null and b/workspaces/codeserver-workspace/mkdocs/docs/assets/home/MkDocs.png differ diff --git a/workspaces/codeserver-workspace/mkdocs/docs/assets/home/Static-server.png b/workspaces/codeserver-workspace/mkdocs/docs/assets/home/Static-server.png new file mode 100644 index 0000000..4d8fa6b Binary files /dev/null and b/workspaces/codeserver-workspace/mkdocs/docs/assets/home/Static-server.png differ diff --git a/workspaces/codeserver-workspace/mkdocs/docs/assets/home/Terminal.png b/workspaces/codeserver-workspace/mkdocs/docs/assets/home/Terminal.png new file mode 100644 index 0000000..9ccb947 Binary files /dev/null and b/workspaces/codeserver-workspace/mkdocs/docs/assets/home/Terminal.png differ diff --git a/workspaces/codeserver-workspace/mkdocs/docs/assets/home/Ungit.jpg b/workspaces/codeserver-workspace/mkdocs/docs/assets/home/Ungit.jpg new file mode 100644 index 0000000..c09223c Binary files /dev/null and b/workspaces/codeserver-workspace/mkdocs/docs/assets/home/Ungit.jpg differ diff --git a/workspaces/codeserver-workspace/mkdocs/docs/assets/workspace-circle-white.svg b/workspaces/codeserver-workspace/mkdocs/docs/assets/workspace-circle-white.svg new file mode 100644 index 0000000..dc64996 --- /dev/null +++ b/workspaces/codeserver-workspace/mkdocs/docs/assets/workspace-circle-white.svg @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/workspaces/codeserver-workspace/mkdocs/docs/assets/workspace-circle.svg b/workspaces/codeserver-workspace/mkdocs/docs/assets/workspace-circle.svg new file mode 100644 index 0000000..ca7e150 --- /dev/null +++ b/workspaces/codeserver-workspace/mkdocs/docs/assets/workspace-circle.svg @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/workspaces/codeserver-workspace/mkdocs/docs/javascript/config.js b/workspaces/codeserver-workspace/mkdocs/docs/javascript/config.js new file mode 100644 index 0000000..06dbf38 --- /dev/null +++ b/workspaces/codeserver-workspace/mkdocs/docs/javascript/config.js @@ -0,0 +1,16 @@ +window.MathJax = { + tex: { + inlineMath: [["\\(", "\\)"]], + displayMath: [["\\[", "\\]"]], + processEscapes: true, + processEnvironments: true + }, + options: { + ignoreHtmlClass: ".*|", + processHtmlClass: "arithmatex" + } +}; + +document$.subscribe(() => { + MathJax.typesetPromise() +}) diff --git a/workspaces/codeserver-workspace/mkdocs/docs/pages/my-apps.md b/workspaces/codeserver-workspace/mkdocs/docs/pages/my-apps.md new file mode 100644 index 0000000..5066a8d --- /dev/null +++ b/workspaces/codeserver-workspace/mkdocs/docs/pages/my-apps.md @@ -0,0 +1,100 @@ + + + +{% + set tools = [ + { + "env": "PORT_8038", + "name": "Port 8038", + "image": "port-8038.png", + "description": "My app running on port 8038" + }, + { + "env": "PORT_8039", + "name": "Port 8039", + "image": "port-8039.png", + "description": "My app running on port 8039" + }, + { + "env": "PORT_8040", + "name": "Port 8040", + "image": "port-8040.png", + "description": "My app running on port 8040" + } + ] +%} + + +
+ {% for tool in tools %} + {% set tool_url = get_tool_url(tool.env) %} +
+ + + + +
{{ tool.name }}
+
+
{{ tool.description }}
+
+ {% endfor %} +
+ + + + + diff --git a/workspaces/codeserver-workspace/mkdocs/docs/pages/my-apps/port-8038.png b/workspaces/codeserver-workspace/mkdocs/docs/pages/my-apps/port-8038.png new file mode 100644 index 0000000..bca17d7 Binary files /dev/null and b/workspaces/codeserver-workspace/mkdocs/docs/pages/my-apps/port-8038.png differ diff --git a/workspaces/codeserver-workspace/mkdocs/docs/pages/my-apps/port-8039.png b/workspaces/codeserver-workspace/mkdocs/docs/pages/my-apps/port-8039.png new file mode 100644 index 0000000..2d82aeb Binary files /dev/null and b/workspaces/codeserver-workspace/mkdocs/docs/pages/my-apps/port-8039.png differ diff --git a/workspaces/codeserver-workspace/mkdocs/docs/pages/my-apps/port-8040.png b/workspaces/codeserver-workspace/mkdocs/docs/pages/my-apps/port-8040.png new file mode 100644 index 0000000..2457aba Binary files /dev/null and b/workspaces/codeserver-workspace/mkdocs/docs/pages/my-apps/port-8040.png differ diff --git a/workspaces/codeserver-workspace/mkdocs/docs/stylesheets/extra.css b/workspaces/codeserver-workspace/mkdocs/docs/stylesheets/extra.css new file mode 100644 index 0000000..1259a5b --- /dev/null +++ b/workspaces/codeserver-workspace/mkdocs/docs/stylesheets/extra.css @@ -0,0 +1,19 @@ +[data-md-color-scheme="codeserver"] { + --md-primary-fg-color: #271647; + --md-primary-fg-color--light: #271647; + --md-primary-fg-color--dark: #271647; + --md-accent-fg-color: #44DA88; +} + +[data-md-color-scheme="codeserver-dark"] { + --md-primary-fg-color: #2b3ac4; + --md-primary-fg-color--light: #2b3ac4; + --md-primary-fg-color--dark: #2b3ac4; + --md-accent-fg-color: #44DA88; + + --md-default-bg-color: #2E303E; + --md-default-fg-color--light: #E9EBFC; + --md-typeset-color: #E9EBFC; + --md-typeset-a-color: #E9EBFC; +} + diff --git a/workspaces/codeserver-workspace/mkdocs/helpers.py b/workspaces/codeserver-workspace/mkdocs/macros/helpers.py similarity index 94% rename from workspaces/codeserver-workspace/mkdocs/helpers.py rename to workspaces/codeserver-workspace/mkdocs/macros/helpers.py index 10d7466..c36e539 100644 --- a/workspaces/codeserver-workspace/mkdocs/helpers.py +++ b/workspaces/codeserver-workspace/mkdocs/macros/helpers.py @@ -7,13 +7,9 @@ import os port_increments = { "DOCS_URL": 0, "FILEBROWSER_URL": 1, - "STATICFS_URL": 2, - "CRONICLE_URL": 3, "UNGIT_URL": 4, "IDE_URL": 5, "TERMINAL_URL": 6, - "MC_URL": 7, - "HTOP_URL": 8, "PORT_8038": 18, "PORT_8039": 19, "PORT_8040": 20 diff --git a/workspaces/codeserver-workspace/mkdocs/mkdocs.yml b/workspaces/codeserver-workspace/mkdocs/mkdocs.yml index 6db1071..a5b998b 100644 --- a/workspaces/codeserver-workspace/mkdocs/mkdocs.yml +++ b/workspaces/codeserver-workspace/mkdocs/mkdocs.yml @@ -5,6 +5,7 @@ nav: - Home: README.md - My apps: pages/my-apps.md + - About: about.md - Docs: https://docs.alnoda.org/codeserver-workspace/ @@ -12,7 +13,7 @@ nav: # CONFIGURATION # =========================================================== -site_name: My workspace +site_name: Codeserver workspace repo_url: https://github.com/bluxmit/alnoda-workspaces site_url: https://docs.alnoda.org edit_uri: "" @@ -23,26 +24,22 @@ edit_uri: "" theme: name: 'material' - favicon: 'assets/favicon.ico' - logo: 'assets/Alnoda-logo.svg' + favicon: 'assets/workspace-circle.svg' + logo: 'assets/workspace-circle-white.svg' custom_dir: overrides icon: - repo: fontawesome/brands/git-alt + repo: fontawesome/brands/github features: - navigation.instant palette: - - scheme: default + - scheme: codeserver toggle: - icon: material/toggle-switch-off-outline - name: Switch to light mode - primary: brown - accent: deep orange - - scheme: slate - toggle: - icon: material/toggle-switch + icon: material/brightness-7 name: Switch to dark mode - primary: orange - accent: red + - scheme: codeserver-dark + toggle: + icon: material/brightness-4 + name: Switch to light mode extra: # Link to open when your logo is clicked @@ -50,11 +47,12 @@ extra: host_url: http://docs.alnoda.org plugins: - - search # Enable Macros and jinja2 templates - macros: module_name: macros/helpers +extra_css: + - stylesheets/extra.css extra_javascript: - javascripts/config.js diff --git a/workspaces/codeserver-workspace/mkdocs/overrides/partials/footer.html b/workspaces/codeserver-workspace/mkdocs/overrides/partials/footer.html new file mode 100644 index 0000000..e69de29 diff --git a/workspaces/kubespray-workspace/docs/future-improvements.md b/workspaces/kubespray-workspace/docs/future-improvements.md index 6af9da3..3e784c4 100644 --- a/workspaces/kubespray-workspace/docs/future-improvements.md +++ b/workspaces/kubespray-workspace/docs/future-improvements.md @@ -20,3 +20,27 @@ - [stern](https://github.com/stern/stern) - logs from multiple pods on Kubernetes and multiple containers within the pod. Each result is color coded for quicker debugging. - [tree](https://github.com/ahmetb/kubectl-tree) - show a tree of object hierarchies through ownerReferences. - [view-secret](https://github.com/elsesiy/kubectl-view-secret) - easy secret decoding. Useful if you want to see what's inside of a secret. + +``` +kubectl krew install access-matrix \ + && kubectl krew install df-pv \ + && kubectl krew install graph \ + && kubectl krew install iexec \ + && kubectl krew install janitor \ + && kubectl krew install ktop \ + && kubectl krew install mtail \ + && kubectl krew install modify-secret \ + && kubectl krew install nsenter \ + && kubectl krew install node-restart \ + && kubectl krew install operator \ + && kubectl krew install pexec \ + && kubectl krew install pod-lens \ + && kubectl krew install popeye \ + && kubectl krew install pv-migrate \ + && kubectl krew install resource-capacity \ + && kubectl krew install sshd \ + && kubectl krew install sql \ + && kubectl krew install stern \ + && kubectl krew install tree \ + && kubectl krew install view-secret +``` \ No newline at end of file diff --git a/workspaces/php-workspace/Dockerfile b/workspaces/php-workspace/Dockerfile index bf456c4..d4824d5 100644 --- a/workspaces/php-workspace/Dockerfile +++ b/workspaces/php-workspace/Dockerfile @@ -1,5 +1,5 @@ ARG docker_registry=docker.io/alnoda -ARG image_tag=2.2 +ARG image_tag=3.0 FROM ${docker_registry}/codeserver-workspace:${image_tag} USER root diff --git a/workspaces/php-workspace/README.md b/workspaces/php-workspace/README.md index 7479844..1fec873 100644 --- a/workspaces/php-workspace/README.md +++ b/workspaces/php-workspace/README.md @@ -1,14 +1,11 @@

- Alnoda logo + PHP logo

# PHP workspace -Docker image with PHP, Composer and browser-based VS-Code version. - -

- Collage -

+Containerized isolated development environment for PHP coding. +Includes PHP, Composer, code editor, terminal, filebrowser and git manager. ## Why this images @@ -34,26 +31,19 @@ open [localhost:8020](http://localhost:8020) in browser. VS-Code extensions and works in browser. - [**Terminal**](https://github.com/tsl0922/ttyd) - secure browser-based terminal. - [**FileBrowser**](https://github.com/filebrowser/filebrowser) - manage files and folders inside the workspace, and exchange data between local environment and the workspace -- [**Cronicle**](https://github.com/jhuckaby/Cronicle) - task scheduler and runner, with a web based front-end UI. It handles both scheduled, repeating and on-demand jobs, targeting any number of worker servers, with real-time stats and live log viewer. -- [**Static File Server**](https://github.com/vercel/serve) - view any static html sites as easy as if you do it on your local machine. Serve static websites easily. - [**Ungit**](https://github.com/FredrikNoren/ungit) - rings user friendliness to git without sacrificing the versatility of it. -- [**MkDocs**](https://squidfunk.github.io/mkdocs-material/) - create awesome documentation for your project with only markdown. -- [**Midnight Commander**](https://midnight-commander.org/) - Feature rich visual file manager with internal text viewer and editor. -- [**Process Monitor**](https://htop.dev/) - Monitor running process and resource utilization. -- Quicklaunch UI with getting started tutorial - -Image is built from **Ubuntu 20.4** with the additional CLI apps - -- [Zsh](https://www.zsh.org/), [Oh my Zsh](https://ohmyz.sh/) -- Python 3, Pip -- Node/nodeenv -- curl, wget, telnet, jq -- **Git:** git, git-flow, lazygit -- **File browsers:** mc, xplr -- **Text editors:** nano, vim, mcedit -- **System monitors:** ncdu, htop, glances, vizex -- **Process Control:** supervisord -- **Job scheduler:** cron +- **Ubuntu 20.4** with the following CLI apps + - [Zsh](https://www.zsh.org/), [Oh my Zsh](https://ohmyz.sh/) + - Python 3, Pip + - Node/nodeenv + - curl, wget, telnet, jq + - **Git:** git, git-flow, lazygit + - **File browsers:** mc + - **Text editors:** nano, vim, mcedit + - **System monitors:** ncdu, htop, glances, vizex + - **Process Control:** supervisord + - **Job scheduler:** cron + - **Terminal multiplexer:** tmux ## Docs diff --git a/workspaces/php-workspace/img/php-logo.svg b/workspaces/php-workspace/img/php-logo.svg new file mode 100644 index 0000000..461d857 --- /dev/null +++ b/workspaces/php-workspace/img/php-logo.svg @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + OpenSearch logo + Search engine software fork of Elasticsearch + + + + + + + + + + + + + + + + redash-logo + Created with Sketch. + + + Ruby Icon + This is shape (source) for Clarity vector icon theme for gtk + file_type_elixir + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/workspaces/php-workspace/mkdocs/about.md b/workspaces/php-workspace/mkdocs/about.md new file mode 100644 index 0000000..e69de29 diff --git a/workspaces/php-workspace/mkdocs/extra.css b/workspaces/php-workspace/mkdocs/extra.css new file mode 100644 index 0000000..1259a5b --- /dev/null +++ b/workspaces/php-workspace/mkdocs/extra.css @@ -0,0 +1,19 @@ +[data-md-color-scheme="codeserver"] { + --md-primary-fg-color: #271647; + --md-primary-fg-color--light: #271647; + --md-primary-fg-color--dark: #271647; + --md-accent-fg-color: #44DA88; +} + +[data-md-color-scheme="codeserver-dark"] { + --md-primary-fg-color: #2b3ac4; + --md-primary-fg-color--light: #2b3ac4; + --md-primary-fg-color--dark: #2b3ac4; + --md-accent-fg-color: #44DA88; + + --md-default-bg-color: #2E303E; + --md-default-fg-color--light: #E9EBFC; + --md-typeset-color: #E9EBFC; + --md-typeset-a-color: #E9EBFC; +} + diff --git a/workspaces/php-workspace/mkdocs/mkdocs.yml b/workspaces/php-workspace/mkdocs/mkdocs.yml index 82a3b7c..66d45de 100644 --- a/workspaces/php-workspace/mkdocs/mkdocs.yml +++ b/workspaces/php-workspace/mkdocs/mkdocs.yml @@ -5,6 +5,7 @@ nav: - Home: README.md - My apps: pages/my-apps.md + - About: about.md - Docs: https://docs.alnoda.org/php-workspace/ @@ -23,26 +24,23 @@ edit_uri: "" theme: name: 'material' - favicon: 'assets/favicon.ico' - logo: 'assets/Alnoda-logo.svg' + favicon: 'assets/php-circle.svg' + logo: 'assets/php-circle.svg' custom_dir: overrides icon: - repo: fontawesome/brands/git-alt + repo: fontawesome/brands/github features: - navigation.instant palette: - - scheme: default + - scheme: php toggle: - icon: material/toggle-switch-off-outline - name: Switch to light mode - primary: white - accent: teal - - scheme: slate - toggle: - icon: material/toggle-switch + icon: material/brightness-7 name: Switch to dark mode - primary: white - accent: teal + - scheme: php-dark + toggle: + icon: material/brightness-4 + name: Switch to light mode + extra: # Link to open when your logo is clicked @@ -50,11 +48,12 @@ extra: host_url: http://docs.alnoda.org plugins: - - search # Enable Macros and jinja2 templates - macros: module_name: macros/helpers +extra_css: + - stylesheets/extra.css extra_javascript: - javascripts/config.js diff --git a/workspaces/theia-workspace/1.15.0.package.json b/workspaces/theia-workspace/1.15.0.package.json new file mode 100644 index 0000000..b0a1d42 --- /dev/null +++ b/workspaces/theia-workspace/1.15.0.package.json @@ -0,0 +1,123 @@ +{ + "private": true, + "theia": { + "frontend": { + "config": { + "applicationName": "Theia IDE", + "warnOnPotentiallyInsecureHostPattern": false, + "preferences": { + "files.enableTrash": false + } + } + } + }, + "resolutions": { + "**/*/colors": "1.4.0" + }, + "dependencies": { + "@theia/editor-preview": "1.15.0", + "@theia/file-search": "1.15.0", + "@theia/getting-started": "1.15.0", + "@theia/git": "1.15.0", + "@theia/markers": "1.15.0", + "@theia/messages": "1.15.0", + "@theia/monaco": "1.15.0", + "@theia/navigator": "1.15.0", + "@theia/outline-view": "1.15.0", + "@theia/plugin-ext-vscode": "1.15.0", + "@theia/preferences": "1.15.0", + "@theia/preview": "1.15.0", + "@theia/search-in-workspace": "1.15.0", + "@theia/terminal": "1.15.0", + "@theia/vsx-registry": "1.15.0" + }, + "devDependencies": { + "@theia/cli": "1.15.0" + }, + "scripts": { + "preinstall": "node-gyp install" + }, + "theiaPluginsDir": "plugins", + "theiaPlugins": { + "vscode-builtin-bat": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/bat-1.39.1-prel.vsix", + "vscode-builtin-clojure": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/clojure-1.39.1-prel.vsix", + "vscode-builtin-coffeescript": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/coffeescript-1.39.1-prel.vsix", + "vscode-builtin-configuration-editing": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/configuration-editing-1.39.1-prel.vsix", + "vscode-builtin-cpp": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/cpp-1.39.1-prel.vsix", + "vscode-builtin-csharp": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/csharp-1.39.1-prel.vsix", + "vscode-builtin-css": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/css-1.39.1-prel.vsix", + "vscode-builtin-debug-auto-launch": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/debug-auto-launch-1.39.1-prel.vsix", + "vscode-builtin-docker": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/docker-1.39.1-prel.vsix", + "vscode-builtin-emmet": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/emmet-1.39.1-prel.vsix", + "vscode-builtin-fsharp": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/fsharp-1.39.1-prel.vsix", + "vscode-builtin-go": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/go-1.39.1-prel.vsix", + "vscode-builtin-groovy": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/groovy-1.39.1-prel.vsix", + "vscode-builtin-grunt": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/grunt-1.39.1-prel.vsix", + "vscode-builtin-gulp": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/gulp-1.39.1-prel.vsix", + "vscode-builtin-handlebars": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/handlebars-1.39.1-prel.vsix", + "vscode-builtin-hlsl": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/hlsl-1.39.1-prel.vsix", + "vscode-builtin-html": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/html-1.39.1-prel.vsix", + "vscode-builtin-html-language-features": "https://open-vsx.org/api/vscode/html-language-features/1.49.0/file/vscode.html-language-features-1.49.0.vsix", + "vscode-builtin-ini": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/ini-1.39.1-prel.vsix", + "vscode-builtin-jake": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/jake-1.39.1-prel.vsix", + "vscode-builtin-java": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/java-1.39.1-prel.vsix", + "vscode-builtin-javascript": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/javascript-1.39.1-prel.vsix", + "vscode-builtin-json": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/json-1.39.1-prel.vsix", + "vscode-builtin-json-language-features": "https://open-vsx.org/api/vscode/json-language-features/1.46.1/file/vscode.json-language-features-1.46.1.vsix", + "vscode-builtin-less": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/less-1.39.1-prel.vsix", + "vscode-builtin-log": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/log-1.39.1-prel.vsix", + "vscode-builtin-lua": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/lua-1.39.1-prel.vsix", + "vscode-builtin-make": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/make-1.39.1-prel.vsix", + "vscode-builtin-markdown": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/markdown-1.39.1-prel.vsix", + "vscode-builtin-merge-conflicts": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/merge-conflict-1.39.1-prel.vsix", + "vscode-builtin-npm": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/npm-1.39.1-prel.vsix", + "vscode-builtin-node-debug": "https://github.com/theia-ide/vscode-node-debug/releases/download/v1.35.3/node-debug-1.35.3.vsix", + "vscode-builtin-node-debug2": "https://github.com/theia-ide/vscode-node-debug2/releases/download/v1.33.0/node-debug2-1.33.0.vsix", + "vscode-builtin-objective-c": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/objective-c-1.39.1-prel.vsix", + "vscode-builtin-perl": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/perl-1.39.1-prel.vsix", + "vscode-builtin-powershell": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/powershell-1.39.1-prel.vsix", + "vscode-builtin-pug": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/pug-1.39.1-prel.vsix", + "vscode-builtin-python": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/python-1.39.1-prel.vsix", + "vscode-builtin-r": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/r-1.39.1-prel.vsix", + "vscode-builtin-razor": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/razor-1.39.1-prel.vsix", + "vscode-builtin-ruby": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/ruby-1.39.1-prel.vsix", + "vscode-builtin-rust": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/rust-1.39.1-prel.vsix", + "vscode-builtin-scss": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/scss-1.39.1-prel.vsix", + "vscode-builtin-shaderlab": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/shaderlab-1.39.1-prel.vsix", + "vscode-builtin-shellscript": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/shellscript-1.39.1-prel.vsix", + "vscode-builtin-sql": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/sql-1.39.1-prel.vsix", + "vscode-builtin-swift": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/swift-1.39.1-prel.vsix", + "vscode-builtin-theme-abyss": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-abyss-1.39.1-prel.vsix", + "vscode-builtin-theme-defaults": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-defaults-1.39.1-prel.vsix", + "vscode-builtin-theme-kimbie-dark": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-kimbie-dark-1.39.1-prel.vsix", + "vscode-builtin-theme-monokai": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-monokai-1.39.1-prel.vsix", + "vscode-builtin-theme-dimmed": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-monokai-dimmed-1.39.1-prel.vsix", + "vscode-builtin-theme-quietlight": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-quietlight-1.39.1-prel.vsix", + "vscode-builtin-theme-red": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-red-1.39.1-prel.vsix", + "vscode-builtin-theme-solarized-dark": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-solarized-dark-1.39.1-prel.vsix", + "vscode-builtin-theme-tomorrow-night-blue": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-tomorrow-night-blue-1.39.1-prel.vsix", + "vscode-builtin-typescript": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/typescript-1.39.1-prel.vsix", + "vscode-builtin-typescript-language-features": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/typescript-language-features-1.39.1-prel.vsix", + "vscode-builtin-vb": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/vb-1.39.1-prel.vsix", + "vscode-builtin-icon-theme-seti": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/vscode-theme-seti-1.39.1-prel.vsix", + "vscode-builtin-xml": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/xml-1.39.1-prel.vsix", + "vscode-builtin-yaml": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/yaml-1.39.1-prel.vsix", + "vscode-editorconfig": "https://github.com/theia-ide/editorconfig-vscode/releases/download/v0.14.4/EditorConfig-0.14.4.vsix", + "vscode-python": "https://open-vsx.org/api/ms-python/python/2020.8.105369/file/ms-python.python-2020.8.105369.vsix", + "nadim-vscode.infinity-dark-theme": "https://open-vsx.org/api/nadim-vscode/infinity-dark-theme/1.0.1/file/nadim-vscode.infinity-dark-theme-1.0.1.vsix", + "emroussel.atomize-atom-one-dark-theme": "https://open-vsx.org/api/emroussel/atomize-atom-one-dark-theme/1.5.5/file/emroussel.atomize-atom-one-dark-theme-1.5.5.vsix", + "mhutchie.git-graph": "https://open-vsx.org/api/mhutchie/git-graph/1.30.0/file/mhutchie.git-graph-1.30.0.vsix", + "teabyii.ayu": "https://open-vsx.org/api/teabyii/ayu/0.20.1/file/teabyii.ayu-0.20.1.vsix", + "yurihs.sublime-vscode-theme": "https://open-vsx.org/api/yurihs/sublime-vscode-theme/1.4.1/file/yurihs.sublime-vscode-theme-1.4.1.vsix", + "wesbos.theme-cobalt2": "https://open-vsx.org/api/wesbos/theme-cobalt2/2.1.6/file/wesbos.theme-cobalt2-2.1.6.vsix", + "github.github-vscode-theme": "https://open-vsx.org/api/GitHub/github-vscode-theme/4.1.1/file/GitHub.github-vscode-theme-4.1.1.vsix", + "armandphilippot.coldark": "https://open-vsx.org/api/armandphilippot/coldark/1.2.9/file/armandphilippot.coldark-1.2.9.vsix", + "radiolevity.search-lights": "https://open-vsx.org/api/radiolevity/search-lights/1.10.1/file/radiolevity.search-lights-1.10.1.vsix", + "vladeeg.vscode-theme-vlight": "https://open-vsx.org/api/Vladeeg/vscode-theme-vlight/2.1.0/file/Vladeeg.vscode-theme-vlight-2.1.0.vsix", + "akamud.vscode-theme-onelight": "https://open-vsx.org/api/akamud/vscode-theme-onelight/2.2.3/file/akamud.vscode-theme-onelight-2.2.3.vsix", + "akamud.vscode-theme-onedark": "https://open-vsx.org/api/akamud/vscode-theme-onedark/2.2.3/file/akamud.vscode-theme-onedark-2.2.3.vsix", + "emroussel.atom-icons": "https://open-vsx.org/api/emroussel/atom-icons/1.2.0/file/emroussel.atom-icons-1.2.0.vsix", + "laurenttreguier.vscode-simple-icons": "https://open-vsx.org/api/LaurentTreguier/vscode-simple-icons/1.16.0/file/LaurentTreguier.vscode-simple-icons-1.16.0.vsix", + "technicolor-creamsicle.deepdark-material": "https://open-vsx.org/api/technicolor-creamsicle/deepdark-material/3.3.0/file/technicolor-creamsicle.deepdark-material-3.3.0.vsix" + } +} diff --git a/workspaces/theia-workspace/Dockerfile b/workspaces/theia-workspace/Dockerfile new file mode 100644 index 0000000..c2eb6d7 --- /dev/null +++ b/workspaces/theia-workspace/Dockerfile @@ -0,0 +1,78 @@ + +ARG docker_registry=docker.io/alnoda +ARG image_tag=3.0 + +## Images used: +ARG BUILD_IMAGE=node:12.18.3 +ARG DEPLOY_IMAGE=${docker_registry}/base-devspace:${image_tag} + + +################################################################################ BUILD + +ARG THEIA_VERSION=1.15.0 +#ARG THEIA_VERSION=latest +#ARG THEIA_VERSION=next +FROM ${BUILD_IMAGE} + +ARG THEIA_VERSION + +RUN apt-get update \ + && apt-get upgrade -y \ + && apt-get install -y apt-utils \ + && apt-get install -y git \ + && apt-get install -y libsecret-1-dev \ + && mkdir /opt/theia + +WORKDIR /opt/theia +ADD ${THEIA_VERSION}.package.json ./package.json +ARG GITHUB_TOKEN +RUN yarn --pure-lockfile && \ + NODE_OPTIONS="--max_old_space_size=4096" yarn theia build && \ + yarn theia download:plugins && \ + yarn --production && \ + yarn autoclean --init && \ + echo *.ts >> .yarnclean && \ + echo *.ts.map >> .yarnclean && \ + echo *.spec.* >> .yarnclean && \ + yarn autoclean --force && \ + yarn cache clean + + +################################################################################ IMAGE + +FROM ${DEPLOY_IMAGE} + +USER root + +RUN mkdir /opt/theia \ + && cd /opt/theia && nodeenv --node=12.18.3 env && . env/bin/activate \ + && apt-get install -y libsecret-1-dev + +COPY --from=0 /opt/theia /opt/theia +COPY settings.json /home/abc/.theia/settings.json +COPY supervisord-theia.conf /etc/supervisord/ + +COPY ./mkdocs/ /home/docs/ + +ENV SHELL=/bin/bash \ + THEIA_DEFAULT_PLUGINS=local-dir:/opt/theia/plugins \ + USE_LOCAL_GIT=true \ + HOME=/home/abc \ + PATH="/home/abc/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" \ + NVM_DIR=/home/abc/.nvm + +RUN echo "------------------------------------------------------ utils" \ + && rm -rf /home/abc/utils || true \ + && git clone https://github.com/bluxmit/alnoda-workspaces /tmp/alnoda-workspaces \ + && mv /tmp/alnoda-workspaces/utils /home/abc/ \ + && rm -rf /tmp/alnoda-workspaces \ + && echo "------------------------------------------------------ user" \ + && chown -R abc /opt/theia \ + && mkdir -p /var/log/theia && chown -R abc /var/log/theia \ + && chown -R abc /home/docs \ + && chown -R abc /home/abc/utils \ + && chown -R abc /home/abc/installed-python-packages \ + && find /home -type d | xargs -I{} chown -R abc {} \ + && find /home -type f | xargs -I{} chown abc {} + +USER abc \ No newline at end of file diff --git a/workspaces/theia-workspace/README.md b/workspaces/theia-workspace/README.md new file mode 100644 index 0000000..4794543 --- /dev/null +++ b/workspaces/theia-workspace/README.md @@ -0,0 +1,49 @@ +

+ Theia logo +

+ +# Theia workspace + +General-purpose containerized isolated development environment. +Includes code editor, terminal, filebrowser and git manager. + +## Why this images + +1. If you need isolated dev environment where you can code and install packages and apps without affecting the base operating system. +2. If you are building self-hosted remote development environment. + +## Start + +``` +docker run --name space-1 -d -p 8020-8040:8020-8040 alnoda/theia-workspace +``` + +and open [localhost:8020](http://localhost:8020) in browser. + +## Features + +- [**Eclipse Theia**](https://theia-ide.org/docs/) - open source version of popular Visual Studio Code IDE. Theia is trully open-source, has +VS-Code extensions and works in browser. This means it can run inside a docker container on local machine or in cloud. A lot of beautiful color themes and many common plugins are already installed to save time. +- [**Terminal**](https://github.com/tsl0922/ttyd) - secure browser-based terminal. +- [**FileBrowser**](https://github.com/filebrowser/filebrowser) - manage files and folders inside the workspace, and exchange data between local environment and the workspace +- [**Ungit**](https://github.com/FredrikNoren/ungit) - rings user friendliness to git without sacrificing the versatility of it. +- **Ubuntu 20.4** with the following CLI apps + - [Zsh](https://www.zsh.org/), [Oh my Zsh](https://ohmyz.sh/) + - Python 3, Pip + - Node/nodeenv + - curl, wget, telnet, jq + - **Git:** git, git-flow, lazygit + - **File browsers:** mc + - **Text editors:** nano, vim, mcedit + - **System monitors:** ncdu, htop, glances, vizex + - **Process Control:** supervisord + - **Job scheduler:** cron + - **Terminal multiplexer:** tmux + +## Docs + +See our guides + +- [**project docs**](https://docs.alnoda.org/) +- [**getting started**](https://docs.alnoda.org/get-started/common-features/) + diff --git a/workspaces/theia-workspace/img/codeserver-collage-sm.jpg b/workspaces/theia-workspace/img/codeserver-collage-sm.jpg new file mode 100644 index 0000000..b59dddf Binary files /dev/null and b/workspaces/theia-workspace/img/codeserver-collage-sm.jpg differ diff --git a/workspaces/theia-workspace/img/codeserver-demo.gif b/workspaces/theia-workspace/img/codeserver-demo.gif new file mode 100644 index 0000000..0b2baa1 Binary files /dev/null and b/workspaces/theia-workspace/img/codeserver-demo.gif differ diff --git a/workspaces/theia-workspace/img/codeserver-docs.gif b/workspaces/theia-workspace/img/codeserver-docs.gif new file mode 100644 index 0000000..61219f8 Binary files /dev/null and b/workspaces/theia-workspace/img/codeserver-docs.gif differ diff --git a/workspaces/theia-workspace/img/codeserver-remote-gen.gif b/workspaces/theia-workspace/img/codeserver-remote-gen.gif new file mode 100644 index 0000000..2dd2725 Binary files /dev/null and b/workspaces/theia-workspace/img/codeserver-remote-gen.gif differ diff --git a/workspaces/theia-workspace/img/codeserver-ui.png b/workspaces/theia-workspace/img/codeserver-ui.png new file mode 100644 index 0000000..aa11f03 Binary files /dev/null and b/workspaces/theia-workspace/img/codeserver-ui.png differ diff --git a/workspaces/theia-workspace/img/codeserver-wid-collage.png b/workspaces/theia-workspace/img/codeserver-wid-collage.png new file mode 100644 index 0000000..3148a74 Binary files /dev/null and b/workspaces/theia-workspace/img/codeserver-wid-collage.png differ diff --git a/workspaces/theia-workspace/img/codeserver-wid-demo.gif b/workspaces/theia-workspace/img/codeserver-wid-demo.gif new file mode 100644 index 0000000..f52f71f Binary files /dev/null and b/workspaces/theia-workspace/img/codeserver-wid-demo.gif differ diff --git a/workspaces/theia-workspace/img/theia.svg b/workspaces/theia-workspace/img/theia.svg new file mode 100644 index 0000000..f1c76e6 --- /dev/null +++ b/workspaces/theia-workspace/img/theia.svg @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/workspaces/theia-workspace/mkdocs/.gitignore b/workspaces/theia-workspace/mkdocs/.gitignore new file mode 100644 index 0000000..c9bd680 --- /dev/null +++ b/workspaces/theia-workspace/mkdocs/.gitignore @@ -0,0 +1,68 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ + +# Translations +*.mo + +# Scrapy stuff: +.scrapy + +# PyBuilder +target/ + +# IPython Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# virtualenv +venv/ +ENV/ + +# MkDocs documentation +site/ \ No newline at end of file diff --git a/workspaces/theia-workspace/mkdocs/docs/README.md b/workspaces/theia-workspace/mkdocs/docs/README.md new file mode 100644 index 0000000..701005f --- /dev/null +++ b/workspaces/theia-workspace/mkdocs/docs/README.md @@ -0,0 +1,106 @@ + + + +{% + set tools = [ + { + "env": "IDE_URL", + "name": "IDE", + "image": "assets/home/IDE.jpg", + "description": "Browser-based version of Visual Studio Code. Develop in any language, install hundreeds of extensions" + }, + { + "env": "TERMINAL_URL", + "name": "Terminal", + "image": "assets/home/Terminal.png", + "description": "Full-fledged WEB-based Command Line Interface" + }, + { + "env": "FILEBROWSER_URL", + "name": "File Browser", + "image": "assets/home/Filebrowser.png", + "description": "Browse, upload and download files and folders to and from the Workspace" + }, + { + "env": "UNGIT_URL", + "name": "Ungit", + "image": "assets/home/Ungit.jpg", + "description": "Manage Git repositories and work flow using beautiful UI" + } + ] +%} + + +
+ {% for tool in tools %} + {% set tool_url = get_tool_url(tool.env) %} +
+ + + + +
{{ tool.name }}
+
+
{{ tool.description }}
+
+ {% endfor %} +
+ + + + + diff --git a/workspaces/theia-workspace/mkdocs/docs/about.md b/workspaces/theia-workspace/mkdocs/docs/about.md new file mode 100644 index 0000000..651653e --- /dev/null +++ b/workspaces/theia-workspace/mkdocs/docs/about.md @@ -0,0 +1,2 @@ +General-purpose containerized isolated development environment. +Includes code editor, terminal, filebrowser and git manager. \ No newline at end of file diff --git a/workspaces/theia-workspace/mkdocs/docs/assets/Alnoda-logo.svg b/workspaces/theia-workspace/mkdocs/docs/assets/Alnoda-logo.svg new file mode 100644 index 0000000..db53f4c --- /dev/null +++ b/workspaces/theia-workspace/mkdocs/docs/assets/Alnoda-logo.svg @@ -0,0 +1,70 @@ + + + +Created with Fabric.js 3.6.3 + + + + + \ No newline at end of file diff --git a/workspaces/theia-workspace/mkdocs/docs/assets/favicon.ico b/workspaces/theia-workspace/mkdocs/docs/assets/favicon.ico new file mode 100644 index 0000000..2c8bed5 Binary files /dev/null and b/workspaces/theia-workspace/mkdocs/docs/assets/favicon.ico differ diff --git a/workspaces/theia-workspace/mkdocs/docs/assets/home/Filebrowser.png b/workspaces/theia-workspace/mkdocs/docs/assets/home/Filebrowser.png new file mode 100644 index 0000000..f4b5700 Binary files /dev/null and b/workspaces/theia-workspace/mkdocs/docs/assets/home/Filebrowser.png differ diff --git a/workspaces/theia-workspace/mkdocs/docs/assets/home/IDE.jpg b/workspaces/theia-workspace/mkdocs/docs/assets/home/IDE.jpg new file mode 100644 index 0000000..e74adaa Binary files /dev/null and b/workspaces/theia-workspace/mkdocs/docs/assets/home/IDE.jpg differ diff --git a/workspaces/theia-workspace/mkdocs/docs/assets/home/MkDocs.png b/workspaces/theia-workspace/mkdocs/docs/assets/home/MkDocs.png new file mode 100755 index 0000000..333cb6c Binary files /dev/null and b/workspaces/theia-workspace/mkdocs/docs/assets/home/MkDocs.png differ diff --git a/workspaces/theia-workspace/mkdocs/docs/assets/home/Terminal.png b/workspaces/theia-workspace/mkdocs/docs/assets/home/Terminal.png new file mode 100644 index 0000000..9ccb947 Binary files /dev/null and b/workspaces/theia-workspace/mkdocs/docs/assets/home/Terminal.png differ diff --git a/workspaces/theia-workspace/mkdocs/docs/assets/home/Ungit.jpg b/workspaces/theia-workspace/mkdocs/docs/assets/home/Ungit.jpg new file mode 100644 index 0000000..c09223c Binary files /dev/null and b/workspaces/theia-workspace/mkdocs/docs/assets/home/Ungit.jpg differ diff --git a/workspaces/theia-workspace/mkdocs/docs/assets/theia-circle-white.svg b/workspaces/theia-workspace/mkdocs/docs/assets/theia-circle-white.svg new file mode 100644 index 0000000..bca8f47 --- /dev/null +++ b/workspaces/theia-workspace/mkdocs/docs/assets/theia-circle-white.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/workspaces/theia-workspace/mkdocs/docs/assets/theia-circle.svg b/workspaces/theia-workspace/mkdocs/docs/assets/theia-circle.svg new file mode 100644 index 0000000..4aec708 --- /dev/null +++ b/workspaces/theia-workspace/mkdocs/docs/assets/theia-circle.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/workspaces/theia-workspace/mkdocs/docs/assets/workspace-circle-white.svg b/workspaces/theia-workspace/mkdocs/docs/assets/workspace-circle-white.svg new file mode 100644 index 0000000..dc64996 --- /dev/null +++ b/workspaces/theia-workspace/mkdocs/docs/assets/workspace-circle-white.svg @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/workspaces/theia-workspace/mkdocs/docs/assets/workspace-circle.svg b/workspaces/theia-workspace/mkdocs/docs/assets/workspace-circle.svg new file mode 100644 index 0000000..ca7e150 --- /dev/null +++ b/workspaces/theia-workspace/mkdocs/docs/assets/workspace-circle.svg @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/workspaces/theia-workspace/mkdocs/docs/javascript/config.js b/workspaces/theia-workspace/mkdocs/docs/javascript/config.js new file mode 100644 index 0000000..06dbf38 --- /dev/null +++ b/workspaces/theia-workspace/mkdocs/docs/javascript/config.js @@ -0,0 +1,16 @@ +window.MathJax = { + tex: { + inlineMath: [["\\(", "\\)"]], + displayMath: [["\\[", "\\]"]], + processEscapes: true, + processEnvironments: true + }, + options: { + ignoreHtmlClass: ".*|", + processHtmlClass: "arithmatex" + } +}; + +document$.subscribe(() => { + MathJax.typesetPromise() +}) diff --git a/workspaces/theia-workspace/mkdocs/docs/pages/my-apps.md b/workspaces/theia-workspace/mkdocs/docs/pages/my-apps.md new file mode 100644 index 0000000..5066a8d --- /dev/null +++ b/workspaces/theia-workspace/mkdocs/docs/pages/my-apps.md @@ -0,0 +1,100 @@ + + + +{% + set tools = [ + { + "env": "PORT_8038", + "name": "Port 8038", + "image": "port-8038.png", + "description": "My app running on port 8038" + }, + { + "env": "PORT_8039", + "name": "Port 8039", + "image": "port-8039.png", + "description": "My app running on port 8039" + }, + { + "env": "PORT_8040", + "name": "Port 8040", + "image": "port-8040.png", + "description": "My app running on port 8040" + } + ] +%} + + +
+ {% for tool in tools %} + {% set tool_url = get_tool_url(tool.env) %} +
+ + + + +
{{ tool.name }}
+
+
{{ tool.description }}
+
+ {% endfor %} +
+ + + + + diff --git a/workspaces/theia-workspace/mkdocs/docs/pages/my-apps/port-8038.png b/workspaces/theia-workspace/mkdocs/docs/pages/my-apps/port-8038.png new file mode 100644 index 0000000..bca17d7 Binary files /dev/null and b/workspaces/theia-workspace/mkdocs/docs/pages/my-apps/port-8038.png differ diff --git a/workspaces/theia-workspace/mkdocs/docs/pages/my-apps/port-8039.png b/workspaces/theia-workspace/mkdocs/docs/pages/my-apps/port-8039.png new file mode 100644 index 0000000..2d82aeb Binary files /dev/null and b/workspaces/theia-workspace/mkdocs/docs/pages/my-apps/port-8039.png differ diff --git a/workspaces/theia-workspace/mkdocs/docs/pages/my-apps/port-8040.png b/workspaces/theia-workspace/mkdocs/docs/pages/my-apps/port-8040.png new file mode 100644 index 0000000..2457aba Binary files /dev/null and b/workspaces/theia-workspace/mkdocs/docs/pages/my-apps/port-8040.png differ diff --git a/workspaces/theia-workspace/mkdocs/docs/stylesheets/extra.css b/workspaces/theia-workspace/mkdocs/docs/stylesheets/extra.css new file mode 100644 index 0000000..927cfd4 --- /dev/null +++ b/workspaces/theia-workspace/mkdocs/docs/stylesheets/extra.css @@ -0,0 +1,19 @@ +[data-md-color-scheme="theia"] { + --md-primary-fg-color: #2A2D2E; + --md-primary-fg-color--light: #2A2D2E; + --md-primary-fg-color--dark: #2A2D2E; + --md-accent-fg-color: #9CDCFE; +} + +[data-md-color-scheme="theia-dark"] { + --md-primary-fg-color: #3C3C3C; + --md-primary-fg-color--light: #3C3C3C; + --md-primary-fg-color--dark: #3C3C3C; + --md-accent-fg-color: #2A2D2E; + + --md-default-bg-color: #1E1E1E; + --md-default-fg-color--light: #9CDCFE; + --md-typeset-color: #9CDCFE; + --md-typeset-a-color: #9CDCFE; +} + diff --git a/workspaces/theia-workspace/mkdocs/macros/helpers.py b/workspaces/theia-workspace/mkdocs/macros/helpers.py new file mode 100644 index 0000000..c36e539 --- /dev/null +++ b/workspaces/theia-workspace/mkdocs/macros/helpers.py @@ -0,0 +1,56 @@ +""" +Basic example of a Mkdocs-macros module. +Include this {{ macros_info() }} in any page to get complete macro info +""" +import os + +port_increments = { + "DOCS_URL": 0, + "FILEBROWSER_URL": 1, + "UNGIT_URL": 4, + "IDE_URL": 5, + "TERMINAL_URL": 6, + "PORT_8038": 18, + "PORT_8039": 19, + "PORT_8040": 20 + } + +# this function name should not be changed +def define_env(env): + """ + This is the hook for defining variables, macros and filters + - variables: the dictionary that contains the environment variables + - macro: a decorator function, to declare a macro. + - filter: a function with one of more arguments, + used to perform a transformation + """ + @env.macro + def get_tool_url(env): + try: + return os.environ[env] + except: + # Get host + host = "localhost" + try: + host = os.environ["WRK_HOST"] + except: + pass + proto = "http" + try: + proto = os.environ["WRK_PROTO"] + except: + pass + # Entry port - port relative to which other ports will be calculated + entry_port = 8020 + try: + entry_port = int(os.environ["ENTRY_PORT"]) + except: + pass + # Assign port + try: + port = port_increments[env] + entry_port + except: + port = 80 + return f"{proto}://{host}:{port}" + + \ No newline at end of file diff --git a/workspaces/theia-workspace/mkdocs/mkdocs.yml b/workspaces/theia-workspace/mkdocs/mkdocs.yml new file mode 100644 index 0000000..2fb8dc8 --- /dev/null +++ b/workspaces/theia-workspace/mkdocs/mkdocs.yml @@ -0,0 +1,68 @@ +# =========================================================== +# NAVIGATION +# =========================================================== + +nav: + - Home: README.md + - My apps: pages/my-apps.md + - About: about.md + - Docs: https://docs.alnoda.org/theia-workspace/ + + +# =========================================================== +# CONFIGURATION +# =========================================================== + +site_name: Theia workspace +repo_url: https://github.com/bluxmit/alnoda-workspaces +site_url: https://docs.alnoda.org +edit_uri: "" + +# =========================================================== +# APPEARANCE +# =========================================================== + +theme: + name: 'material' + favicon: 'assets/theia-circle.svg' + logo: 'assets/theia-circle-white.svg' + custom_dir: overrides + icon: + repo: fontawesome/brands/github + features: + - navigation.instant + palette: + - scheme: theia + toggle: + icon: material/brightness-7 + name: Switch to dark mode + - scheme: theia-dark + toggle: + icon: material/brightness-4 + name: Switch to light mode + +extra: + # Link to open when your logo is clicked + homepage: https://docs.alnoda.org + host_url: http://docs.alnoda.org + +plugins: + # Enable Macros and jinja2 templates + - macros: + module_name: macros/helpers + +extra_css: + - stylesheets/extra.css + +extra_javascript: + - javascripts/config.js + - https://polyfill.io/v3/polyfill.min.js?features=es6 + + + + + + + + + diff --git a/workspaces/theia-workspace/mkdocs/overrides/partials/footer.html b/workspaces/theia-workspace/mkdocs/overrides/partials/footer.html new file mode 100644 index 0000000..e69de29 diff --git a/workspaces/theia-workspace/settings.json b/workspaces/theia-workspace/settings.json new file mode 100644 index 0000000..895957f --- /dev/null +++ b/workspaces/theia-workspace/settings.json @@ -0,0 +1,5 @@ +{ + "terminal.integrated.shell.linux": "/bin/zsh", + "workbench.colorTheme": "Ayu Mirage Bordered", + "git-graph.maxDepthOfRepoSearch": 3 +} \ No newline at end of file diff --git a/workspaces/theia-workspace/supervisord-theia.conf b/workspaces/theia-workspace/supervisord-theia.conf new file mode 100644 index 0000000..7545da3 --- /dev/null +++ b/workspaces/theia-workspace/supervisord-theia.conf @@ -0,0 +1,14 @@ + +[program:theia] +directory=/opt/theia +command=/bin/sh -c " . env/bin/activate && node /opt/theia/src-gen/backend/main.js --hostname=0.0.0.0 --port=8025 /home " +stderr_logfile = /var/log/theia/theia-stderr.log +stdout_logfile = /var/log/theia/theia-stdout.log +logfile_maxbytes = 1024 + + + + + + + diff --git a/workspaces/ubuntu-workspace/README.md b/workspaces/ubuntu-workspace/README.md index b38b2bd..ec71389 100644 --- a/workspaces/ubuntu-workspace/README.md +++ b/workspaces/ubuntu-workspace/README.md @@ -26,11 +26,12 @@ docker exec -it --user=root space-1 /bin/zsh - Node/nodeenv - curl, wget, telnet, jq - **Git:** git, git-flow, lazygit - - **File browsers:** mc, xplr + - **File browsers:** mc - **Text editors:** nano, vim, mcedit - **System monitors:** ncdu, htop, glances, vizex - **Process Control:** supervisord - **Job scheduler:** cron + - **Terminal multiplexer:** tmux ## Why this image