diff --git a/workspaces/redis-workspace/1.15.0.package.json b/workspaces/redis-workspace/1.15.0.package.json new file mode 100644 index 0000000..97d5456 --- /dev/null +++ b/workspaces/redis-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", + "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", + "cweijan.vscode-redis-client": "https://open-vsx.org/api/cweijan/vscode-redis-client/1.2.5/file/cweijan.vscode-redis-client-1.2.5.vsix" + } +} diff --git a/workspaces/redis-workspace/Dockerfile b/workspaces/redis-workspace/Dockerfile new file mode 100644 index 0000000..f59dcfa --- /dev/null +++ b/workspaces/redis-workspace/Dockerfile @@ -0,0 +1,110 @@ + + +ARG docker_registry=docker.io/alnoda +ARG image_tag=18.04-0.9 + +## Images used: +ARG BUILD_IMAGE=node:12.18.3 +ARG DEPLOY_IMAGE=${docker_registry}/base-workspace:${image_tag} + + +################################################################################ BUILD + +ARG THEIA_VERSION=1.15.0 +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=8192" 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 -p -m 777 /opt/theia \ + && cd /opt/theia && nodeenv --node=12.18.3 env && . env/bin/activate \ + && mkdir -p -m 777 /home/project \ + && apt-get install -y libsecret-1-dev \ + && rm -rf /home/docs + +COPY --from=0 /opt/theia /opt/theia +COPY settings.json /home/abc/.theia/settings.json +COPY supervisord-redis-wid.conf /etc/supervisord/ + +COPY mkdocs /home/docs +COPY README.md /home/docs/docs/docs.md + +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 apt-get -y update \ + # && 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 "------------------------------------------------------ local redis" \ + && apt-get -y install redis-server \ + && echo "------------------------------------------------------ redis tools" \ + && apt-get -y install redis-tools \ + && pip install iredis==1.10.0 \ + && echo "------------------------------------------------------ redis-dump" \ + && cd /tmp && wget https://github.com/yannh/redis-dump-go/releases/download/v0.6.0/redis-dump-go-linux-amd64.tar.gz \ + && tar -xzf redis-dump-go-linux-amd64.tar.gz \ + && chmod +x redis-dump-go \ + && mv /tmp/redis-dump-go /usr/bin/redis-dump-go \ + && rm /tmp/redis-dump-go-linux-amd64.tar.gz \ + && echo "------------------------------------------------------ redis-tui" \ + && cd /tmp && wget https://github.com/mylxsw/redis-tui/releases/download/0.1.6/redis-tui-linux \ + && chmod +x /tmp/redis-tui-linux \ + && mv /tmp/redis-tui-linux /usr/bin/redis-tui \ + && rm -rf /tmp/redis-tui-linux \ + && echo "------------------------------------------------------ redis-commander" \ + && mkdir -p -m 777 /opt/redis-commander \ + && cd /opt/redis-commander && nodeenv --node=12.18.3 env && . env/bin/activate \ + && npm install -g redis-commander@0.7.2 \ + && echo "------------------------------------------------------ user" \ + && chown -R abc /opt/theia \ + && mkdir -p /var/log/theia && chown -R abc /var/log/theia \ + && mkdir -p /var/log/redis && chown -R abc /var/log/redis \ + && mkdir -p /opt/redis && chown -R abc /opt/redis \ + && chmod 777 /var/lib/redis \ + && mkdir -p /home/redis-data && chown -R abc /home/redis-data \ + && chown -R abc /opt/redis-commander \ + && mkdir -p /var/log/redis-commander && chown -R abc /var/log/redis-commander \ + && 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 + +COPY redis.conf /opt/redis/redis.conf + diff --git a/workspaces/redis-workspace/README.md b/workspaces/redis-workspace/README.md new file mode 100644 index 0000000..b7fbaeb --- /dev/null +++ b/workspaces/redis-workspace/README.md @@ -0,0 +1,78 @@ +# Redis workspace + +Docker image with Redis, and many other tools that make development with Redis much more convenient. + +

+ Collage +

+ +``` +docker run --name rwid-1 -d -p 8020-8035:8020-8035 alnoda/redis-wid +``` + +open your browser on [http://localhost:8020](http://localhost:8020) + +## Why + +Substitute in your development `docker-compose.yaml` file standard redis image with this one, add port-mapping `-p 8020-8035:8020-8035`. +Now in addition to Redis, you've got a whole set of tools with UIs, that allow you to explore you Redis database, get and set keys, import datasets, +install Redis modules and more. + +__List of tools__ + +- [**Eclipse Theia**](https://theia-ide.org/docs/) +- [Redis extension for VS-Code](https://open-vsx.org/extension/cweijan/vscode-redis-client) +- [Iredis](https://github.com/laixintao/iredis) +- [Redis-dump](https://github.com/yannh/redis-dump-go) +- [Redis-Tui](https://github.com/mylxsw/redis-tui) +- [Redis-commander](https://github.com/joeferner/redis-commander#readme) + +in addition - [the common workspace-in-docker toolset](https://github.com/bluxmit/alnoda-workspaces/tree/main/workspaces/workspace-in-docker). + + +### Get started + +Open workspace UI [http://localhost:800/](http://localhost:8020/) for quick access to all the tools + +

+ Redis WID +

+ +Use workspace terminal [http://localhost:8026/](http://localhost:8026/) and load some Redis datasets +``` +git clone https://github.com/redis-developer/redis-datasets.git /home/project/redis-datasets +cat /home/project/redis-datasets/movie-database/import_actors.redis | redis-cli +cat /home/project/redis-datasets/movie-database/import_movies.redis | redis-cli +``` + +Open Redis Commander UI on [http://localhost:8029/](http://localhost:8029/) and explore Redis databeses + +

+ Redis commander +

+ +Alternatively use browser-based VS-code with Redis extension + +

+ Theia +

+ +In the Workspace terminal launch iredis CLI, get & set keys +``` +iredis +iredis --newbie +``` + +

+ Iredis +

+ +Create dump of the Redis database +``` +redis-dump-go -h localhost > /home/redis-movie-dump.resp +``` +Use File Browser [http://localhost:8021](http://localhost:8021) to get the dump to your PC + + + + diff --git a/workspaces/redis-workspace/img/Redis-wid.png b/workspaces/redis-workspace/img/Redis-wid.png new file mode 100644 index 0000000..3cd77c5 Binary files /dev/null and b/workspaces/redis-workspace/img/Redis-wid.png differ diff --git a/workspaces/redis-workspace/img/Rediscommander.png b/workspaces/redis-workspace/img/Rediscommander.png new file mode 100644 index 0000000..82769c5 Binary files /dev/null and b/workspaces/redis-workspace/img/Rediscommander.png differ diff --git a/workspaces/redis-workspace/img/Theia-redis.png b/workspaces/redis-workspace/img/Theia-redis.png new file mode 100644 index 0000000..4e05830 Binary files /dev/null and b/workspaces/redis-workspace/img/Theia-redis.png differ diff --git a/workspaces/redis-workspace/img/iredis.png b/workspaces/redis-workspace/img/iredis.png new file mode 100644 index 0000000..0658de1 Binary files /dev/null and b/workspaces/redis-workspace/img/iredis.png differ diff --git a/workspaces/redis-workspace/img/redis-wid-collage.png b/workspaces/redis-workspace/img/redis-wid-collage.png new file mode 100644 index 0000000..0c9cd4f Binary files /dev/null and b/workspaces/redis-workspace/img/redis-wid-collage.png differ diff --git a/workspaces/redis-workspace/mkdocs/.gitignore b/workspaces/redis-workspace/mkdocs/.gitignore new file mode 100644 index 0000000..c9bd680 --- /dev/null +++ b/workspaces/redis-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/redis-workspace/mkdocs/docs/README.md b/workspaces/redis-workspace/mkdocs/docs/README.md new file mode 100644 index 0000000..9d5b02c --- /dev/null +++ b/workspaces/redis-workspace/mkdocs/docs/README.md @@ -0,0 +1,28 @@ +**This is a starting point to create docs for this workspace!** + +> Don't neglect documentation for your workspace! Soon you will forget what you were doing with it. +> This page exists for you to modify it, and write down everything you need to know next time you come here. + +In order to change this page, simply modify the file `/home/docs/docs/README.md`. Changes will be applied automatically - the +server that serves this page has live reload. + +In order to add a new doc file, it is enough to create a file in the folder `/home/docs/docs` and add respective entry +to the configuratiion file `/home/docs/mkdcs.yaml`. + +Open workspace terminal, and create new documentation file with some text at your will, and save changes + +> `nano /home/docs/docs/new.md` + +edit file `mkdcs.yaml` + +> `nano /home/docs/mkdcs.yaml` + +Add record about the new file to **nav**, and save changes + +```yaml +nav: + - Home: pages/home/home.md + - About: README.md + - Get started: get-started.md + - New: new.md +``` \ No newline at end of file diff --git a/workspaces/redis-workspace/mkdocs/docs/assets/Alnoda-logo.svg b/workspaces/redis-workspace/mkdocs/docs/assets/Alnoda-logo.svg new file mode 100644 index 0000000..db53f4c --- /dev/null +++ b/workspaces/redis-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/redis-workspace/mkdocs/docs/assets/favicon.ico b/workspaces/redis-workspace/mkdocs/docs/assets/favicon.ico new file mode 100644 index 0000000..2c8bed5 Binary files /dev/null and b/workspaces/redis-workspace/mkdocs/docs/assets/favicon.ico differ diff --git a/workspaces/redis-workspace/mkdocs/docs/javascript/config.js b/workspaces/redis-workspace/mkdocs/docs/javascript/config.js new file mode 100644 index 0000000..06dbf38 --- /dev/null +++ b/workspaces/redis-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/redis-workspace/mkdocs/docs/pages/home/home.md b/workspaces/redis-workspace/mkdocs/docs/pages/home/home.md new file mode 100644 index 0000000..59c3da8 --- /dev/null +++ b/workspaces/redis-workspace/mkdocs/docs/pages/home/home.md @@ -0,0 +1,133 @@ + + + +{% + set tools = [ + { + "env": "IDE_URL", + "name": "IDE", + "image": "IDE.jpg", + "description": "Browser-based version of Visual Studio Code. Develop in any language, install hundreeds of extensions" + }, + { + "env": "TERMINAL_URL", + "name": "Terminal", + "image": "Terminal.png", + "description": "Full-fledged browser-based terminal with Z-shell" + }, + { + "env": "FILEBROWSER_URL", + "name": "File Browser", + "image": "Filebrowser.png", + "description": "Browse, upload and download files and folders to and from the Workspace" + }, + { + "env": "REDIS_COMMANDER_URL", + "name": "Redis Commander", + "image": "Redis-commander.png", + "description": "Redis web management tool" + }, + { + "env": "CRONICLE_URL", + "name": "Cronicle", + "image": "Cronicle.jpg", + "description": "Schedule jobs, manage schedules, observe and monitor executions (user/pass - admin/admin)" + }, + { + "env": "UNGIT_URL", + "name": "Ungit", + "image": "Ungit.jpg", + "description": "Manage Git repositories and work flow using beautiful UI" + }, + { + "env": "STATICFS_URL", + "name": "Static File Server", + "image": "Static-server.png", + "description": "Serve any static websites like a breeze" + }, + { + "env": "MC_URL", + "name": "M.Commander", + "image": "MC.jpg", + "description": "Feature rich visual file manager with internal text viewer and editor" + }, + { + "env": "HTOP_URL", + "name": "Process monitor", + "image": "Htop.jpg", + "description": "Monitor running process and resource utilization" + } + ] +%} + + +
+ {% for tool in tools %} + {% set tool_url = get_tool_url(tool.env) %} +
+ + + + +
{{ tool.name }}
+
+
{{ tool.description }}
+
+ {% endfor %} +
+ + + + + diff --git a/workspaces/redis-workspace/mkdocs/docs/pages/home/home/Cronicle.jpg b/workspaces/redis-workspace/mkdocs/docs/pages/home/home/Cronicle.jpg new file mode 100644 index 0000000..03c56be Binary files /dev/null and b/workspaces/redis-workspace/mkdocs/docs/pages/home/home/Cronicle.jpg differ diff --git a/workspaces/redis-workspace/mkdocs/docs/pages/home/home/Filebrowser.png b/workspaces/redis-workspace/mkdocs/docs/pages/home/home/Filebrowser.png new file mode 100644 index 0000000..f4b5700 Binary files /dev/null and b/workspaces/redis-workspace/mkdocs/docs/pages/home/home/Filebrowser.png differ diff --git a/workspaces/redis-workspace/mkdocs/docs/pages/home/home/Htop.jpg b/workspaces/redis-workspace/mkdocs/docs/pages/home/home/Htop.jpg new file mode 100644 index 0000000..994bc13 Binary files /dev/null and b/workspaces/redis-workspace/mkdocs/docs/pages/home/home/Htop.jpg differ diff --git a/workspaces/redis-workspace/mkdocs/docs/pages/home/home/IDE.jpg b/workspaces/redis-workspace/mkdocs/docs/pages/home/home/IDE.jpg new file mode 100644 index 0000000..0330ae5 Binary files /dev/null and b/workspaces/redis-workspace/mkdocs/docs/pages/home/home/IDE.jpg differ diff --git a/workspaces/redis-workspace/mkdocs/docs/pages/home/home/MC.jpg b/workspaces/redis-workspace/mkdocs/docs/pages/home/home/MC.jpg new file mode 100644 index 0000000..9b0a92a Binary files /dev/null and b/workspaces/redis-workspace/mkdocs/docs/pages/home/home/MC.jpg differ diff --git a/workspaces/redis-workspace/mkdocs/docs/pages/home/home/MkDocs.png b/workspaces/redis-workspace/mkdocs/docs/pages/home/home/MkDocs.png new file mode 100755 index 0000000..333cb6c Binary files /dev/null and b/workspaces/redis-workspace/mkdocs/docs/pages/home/home/MkDocs.png differ diff --git a/workspaces/redis-workspace/mkdocs/docs/pages/home/home/Redis-commander.png b/workspaces/redis-workspace/mkdocs/docs/pages/home/home/Redis-commander.png new file mode 100644 index 0000000..3228e11 Binary files /dev/null and b/workspaces/redis-workspace/mkdocs/docs/pages/home/home/Redis-commander.png differ diff --git a/workspaces/redis-workspace/mkdocs/docs/pages/home/home/Static-server.png b/workspaces/redis-workspace/mkdocs/docs/pages/home/home/Static-server.png new file mode 100644 index 0000000..4d8fa6b Binary files /dev/null and b/workspaces/redis-workspace/mkdocs/docs/pages/home/home/Static-server.png differ diff --git a/workspaces/redis-workspace/mkdocs/docs/pages/home/home/Terminal.png b/workspaces/redis-workspace/mkdocs/docs/pages/home/home/Terminal.png new file mode 100644 index 0000000..9ccb947 Binary files /dev/null and b/workspaces/redis-workspace/mkdocs/docs/pages/home/home/Terminal.png differ diff --git a/workspaces/redis-workspace/mkdocs/docs/pages/home/home/Ungit.jpg b/workspaces/redis-workspace/mkdocs/docs/pages/home/home/Ungit.jpg new file mode 100644 index 0000000..c09223c Binary files /dev/null and b/workspaces/redis-workspace/mkdocs/docs/pages/home/home/Ungit.jpg differ diff --git a/workspaces/redis-workspace/mkdocs/macros/helpers.py b/workspaces/redis-workspace/mkdocs/macros/helpers.py new file mode 100644 index 0000000..0ecda60 --- /dev/null +++ b/workspaces/redis-workspace/mkdocs/macros/helpers.py @@ -0,0 +1,58 @@ +""" +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, + "STATICFS_URL": 2, + "CRONICLE_URL": 3, + "UNGIT_URL": 4, + "IDE_URL": 5, + "TERMINAL_URL": 6, + "MC_URL": 7, + "HTOP_URL": 8, + "REDIS_COMMANDER_URL": 9 + } + +# 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[name] + 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/redis-workspace/mkdocs/mkdocs.yml b/workspaces/redis-workspace/mkdocs/mkdocs.yml new file mode 100644 index 0000000..5293b59 --- /dev/null +++ b/workspaces/redis-workspace/mkdocs/mkdocs.yml @@ -0,0 +1,70 @@ +# =========================================================== +# NAVIGATION +# =========================================================== + +nav: + - Home: pages/home/home.md + - About: README.md + - Docs: docs.md + + +# =========================================================== +# CONFIGURATION +# =========================================================== + +site_name: My Workspace +repo_url: https://github.com/bluxmit/alnoda-workspaces +site_url: https://alnoda.org +edit_uri: "" + +# =========================================================== +# APPEARANCE +# =========================================================== + +theme: + name: 'material' + favicon: 'assets/favicon.ico' + logo: 'assets/Alnoda-logo.svg' + custom_dir: overrides + icon: + repo: fontawesome/brands/git-alt + features: + - navigation.instant + palette: + - scheme: default + toggle: + icon: material/toggle-switch-off-outline + name: Switch to light mode + primary: red + accent: deep orange + - scheme: slate + toggle: + icon: material/toggle-switch + name: Switch to dark mode + primary: deep orange + accent: red + +extra: + # Link to open when your logo is clicked + homepage: https://alnoda.org + host_url: http://localhost + +plugins: + - search + # Enable Macros and jinja2 templates + - macros: + module_name: macros/helpers + + +extra_javascript: + - javascripts/config.js + - https://polyfill.io/v3/polyfill.min.js?features=es6 + + + + + + + + + diff --git a/workspaces/redis-workspace/mkdocs/overrides/partials/footer.html b/workspaces/redis-workspace/mkdocs/overrides/partials/footer.html new file mode 100644 index 0000000..e69de29 diff --git a/workspaces/redis-workspace/redis.conf b/workspaces/redis-workspace/redis.conf new file mode 100644 index 0000000..c441017 --- /dev/null +++ b/workspaces/redis-workspace/redis.conf @@ -0,0 +1 @@ +dir /home/redis-data \ No newline at end of file diff --git a/workspaces/redis-workspace/settings.json b/workspaces/redis-workspace/settings.json new file mode 100644 index 0000000..a75cfb3 --- /dev/null +++ b/workspaces/redis-workspace/settings.json @@ -0,0 +1,5 @@ +{ + "terminal.integrated.shell.linux": "/bin/zsh", + "workbench.colorTheme": "Search Lights Italic", + "git-graph.maxDepthOfRepoSearch": 3 +} \ No newline at end of file diff --git a/workspaces/redis-workspace/supervisord-redis-wid.conf b/workspaces/redis-workspace/supervisord-redis-wid.conf new file mode 100644 index 0000000..fb665e1 --- /dev/null +++ b/workspaces/redis-workspace/supervisord-redis-wid.conf @@ -0,0 +1,26 @@ + +[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 + + +[program:redis-server] +command=redis-server /opt/redis/redis.conf +autostart=true +autorestart=true +stdout_logfile=/var/log/redis/stdout.log +stderr_logfile=/var/log/redis/stderr.log + +[program:redis-commander] +directory=/opt/redis-commander +command=/bin/sh -c " . env/bin/activate && redis-commander --port=8029" +stderr_logfile = /var/log/redis-commander/redis-commander-stderr.log +stdout_logfile = /var/log/redis-commander/redis-commander-stdout.log +logfile_maxbytes = 1024 + + + + diff --git a/workspaces/workspace-in-docker/1.15.0.package.json b/workspaces/workspace-in-docker/1.15.0.package.json index f6adeea..b0a1d42 100644 --- a/workspaces/workspace-in-docker/1.15.0.package.json +++ b/workspaces/workspace-in-docker/1.15.0.package.json @@ -11,6 +11,9 @@ } } }, + "resolutions": { + "**/*/colors": "1.4.0" + }, "dependencies": { "@theia/editor-preview": "1.15.0", "@theia/file-search": "1.15.0", @@ -107,10 +110,14 @@ "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" - } + "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/workspace-in-docker/Dockerfile b/workspaces/workspace-in-docker/Dockerfile index 7221e18..3231aa4 100644 --- a/workspaces/workspace-in-docker/Dockerfile +++ b/workspaces/workspace-in-docker/Dockerfile @@ -1,7 +1,7 @@ ARG docker_registry=docker.io/alnoda -ARG image_tag=18.04-0.9 +ARG image_tag=18.04-0.8 ## Images used: ARG BUILD_IMAGE=node:12.18.3 @@ -48,7 +48,6 @@ USER root RUN mkdir -p -m 777 /opt/theia \ && cd /opt/theia && nodeenv --node=12.18.3 env && . env/bin/activate \ && mkdir -p -m 777 /home/project \ - && apt-get update \ && apt-get install -y libsecret-1-dev \ && rm -rf /home/docs diff --git a/workspaces/workspace-in-docker/mkdocs/macros/helpers.py b/workspaces/workspace-in-docker/mkdocs/macros/helpers.py index 11e499b..f41c074 100644 --- a/workspaces/workspace-in-docker/mkdocs/macros/helpers.py +++ b/workspaces/workspace-in-docker/mkdocs/macros/helpers.py @@ -28,7 +28,7 @@ def define_env(env): @env.macro def get_tool_url(env): try: - return os.environ[env] + return os.environ[name] except: # Get host host = "localhost"