diff --git a/workspaces/postgres-workspace/README.md b/workspaces/postgres-workspace/README.md index 312fbf9..8fb6752 100644 --- a/workspaces/postgres-workspace/README.md +++ b/workspaces/postgres-workspace/README.md @@ -4,7 +4,9 @@ # Postgres workspace -Collected toolset to work with PostgreSQL. Query, explore, manage, develop, test performance, import annd export data, +Collection of tools to interact with PostgreSQL. + +Query, explore, manage, develop, test performance, import annd export data, generate mock data, create backups, manage migrations, generate reports, schedule tasks. ## Why this images diff --git a/workspaces/postgres-workspace/docs/getting-started.md b/workspaces/postgres-workspace/docs/getting-started.md index ab038e5..d2a9360 100644 --- a/workspaces/postgres-workspace/docs/getting-started.md +++ b/workspaces/postgres-workspace/docs/getting-started.md @@ -4,7 +4,7 @@ These tutorials demonstrates how to use Postgres workspace to explore and interact with Postgres. -To start, open workspace UI [http://localhost:8020/](http://localhost:8020/) for quick access to all the tools. +To start, open Quickstart page [http://localhost:8020/](http://localhost:8020/) for quick access to all the tools. Use terminal to execute commands from this tutorial. ## Postgres diff --git a/workspaces/python-workspace/Dockerfile b/workspaces/python-workspace/Dockerfile index 71917bd..a2e8454 100644 --- a/workspaces/python-workspace/Dockerfile +++ b/workspaces/python-workspace/Dockerfile @@ -15,12 +15,8 @@ RUN pip install -r /home/abc/installed-python-packages/python-requirements.txt \ && echo "------------------------------------------------------ graphviz" \ && apt-get update \ && apt-get install -y graphviz \ - && apt-get install -y python-pydot python-pydot-ng \ + && apt-get install -y python3-pydotplus \ && 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 "alias python-report='/home/abc/utils/python-report.sh'" >> /home/abc/.zshrc \ && chmod +x /home/abc/utils/python-report.sh && chown abc /home/abc/utils/python-report.sh \ && echo "------------------------------------------------------ user" \ diff --git a/workspaces/python-workspace/README.md b/workspaces/python-workspace/README.md index 9068bcf..0da3357 100644 --- a/workspaces/python-workspace/README.md +++ b/workspaces/python-workspace/README.md @@ -4,9 +4,8 @@ # Python workspace -Dockerized Python development environment. Fully isolated inside a docker container. -Includes code editor, terminal, scheduler, filebrowser. As well as tools for linting, -testing, auto-documentation, performance and profiling. +Docker image for Python development environment. Includes Python, python tooling together with browser-based IDE, file browser, +static server, job scheduler.

Collage @@ -15,7 +14,7 @@ testing, auto-documentation, performance and profiling. ## 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 want self-hosted remote development environment. +2. If you need self-hosted remote development environment. 3. If you want to get started with Python fast. ## Start diff --git a/workspaces/python-workspace/docs/getting-started.md b/workspaces/python-workspace/docs/getting-started.md index f7731f8..8a82ba6 100644 --- a/workspaces/python-workspace/docs/getting-started.md +++ b/workspaces/python-workspace/docs/getting-started.md @@ -39,7 +39,7 @@ You can install any extension from [open-vsx.org](https://open-vsx.org/) that ha ## Terminal -Open Tterminnal from the Quickstart page. +Open Terminnal from the Quickstart page.

Demo: Browser-based terminal diff --git a/workspaces/redis-workspace/Dockerfile b/workspaces/redis-workspace/Dockerfile index dee9221..8104877 100644 --- a/workspaces/redis-workspace/Dockerfile +++ b/workspaces/redis-workspace/Dockerfile @@ -1,7 +1,7 @@ ARG docker_registry=docker.io/alnoda -ARG image_tag=18.04-1.0 +ARG image_tag=2.0 ## Images used: ARG BUILD_IMAGE=node:12.18.3 diff --git a/workspaces/redis-workspace/README.md b/workspaces/redis-workspace/README.md index fb9b2ce..9563e9a 100644 --- a/workspaces/redis-workspace/README.md +++ b/workspaces/redis-workspace/README.md @@ -3,81 +3,62 @@

# Redis workspace -Docker image with Redis, Redis Commander and other Redis CLI tools. Can be used to manage cloud Redis deployments, -or as Redis docker image with batteries included for local development. + +Docker image with Redis, Redis Commander and several CLI tools to interact with Redis.

- Collage + Collage

+## Why this images + +1. To directly interact with Redis inside your kubernetes cluster. +2. A better Redis docker image for local dev environment. You get Redis together with the toolset to work with it. + +## Start + ``` docker run --name rwid-1 -d -p 8020-8035:8020-8035 alnoda/redis-workspace -``` +``` -open your browser on [http://localhost:8020](http://localhost:8020) +and open [localhost:8020](http://localhost:8020) in browser. -## Why +## Features -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. +**Redis tools:** -__List of tools__ - -- [Eclipse Theia](https://theia-ide.org/docs/) +- [Redis-commander](https://github.com/joeferner/redis-commander#readme) - Redis web management tool. +- [Iredis](https://github.com/laixintao/iredis) - CLI for Redis with AutoCompletion and Syntax Highlighting. +- [Redis-dump](https://github.com/yannh/redis-dump-go) - dump Redis keys to a file. +- [Redis-Tui](https://github.com/mylxsw/redis-tui) - Redis Text-based UI client in CLI. - [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). +**Dev tools:** +- [**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 +- [**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 -### Get started +Image is built from **Ubuntu 20.4** with the additional CLI apps -Open workspace UI [http://localhost:800/](http://localhost:8020/) for quick access to all the tools +- [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 -

- 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 databases - -

- Redis commander -

- -Alternatively use browser-based VS-code [http://localhost:8025/](http://localhost:8025/) 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 - - - -### Future extensions -- [phpRedisAdmin](https://github.com/erikdubbelboer/phpRedisAdmin) +## Docs +See our guides on [**getting started**](docs/getting-started.md) and [**advanced features**](../ubuntu-workspace/docs/workspaces.md). diff --git a/workspaces/redis-workspace/docs/getting-started.md b/workspaces/redis-workspace/docs/getting-started.md new file mode 100644 index 0000000..6cffae7 --- /dev/null +++ b/workspaces/redis-workspace/docs/getting-started.md @@ -0,0 +1,50 @@ +# Get started + +This doc has examples how to use workspace to interact with Redis. + +In examples we use local Redis that is running inside the workspace, but the commands apply to any Redis instance. + + +## Tutorial + +Open Quickstart page [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 databases + +

+ Redis commander +

+ +Alternatively use browser-based VS-code [http://localhost:8025/](http://localhost:8025/) 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/mkdocs/docs/README.md b/workspaces/redis-workspace/mkdocs/docs/README.md index 9d5b02c..8537aaa 100644 --- a/workspaces/redis-workspace/mkdocs/docs/README.md +++ b/workspaces/redis-workspace/mkdocs/docs/README.md @@ -1,28 +1,136 @@ -**This is a starting point to create docs for this workspace!** + -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`. +{% + 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 browser-based terminal with Z-shell" + }, + { + "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": "REDIS_COMMANDER_URL", + "name": "Redis Commander", + "image": "assets/home/Redis-commander.png", + "description": "Redis web management tool" + }, + { + "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": "Process monitor", + "image": "assets/home/Htop.jpg", + "description": "Monitor running process and resource utilization" + } + ] +%} -Open workspace terminal, and create new documentation file with some text at your will, and save changes -> `nano /home/docs/docs/new.md` +
+ {% for tool in tools %} + {% set tool_url = get_tool_url(tool.env) %} +
+ + + + +
{{ tool.name }}
+
+
{{ tool.description }}
+
+ {% endfor %} +
+ -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/pages/home/home/Cronicle.jpg b/workspaces/redis-workspace/mkdocs/docs/assets/home/Cronicle.jpg similarity index 100% rename from workspaces/redis-workspace/mkdocs/docs/pages/home/home/Cronicle.jpg rename to workspaces/redis-workspace/mkdocs/docs/assets/home/Cronicle.jpg diff --git a/workspaces/redis-workspace/mkdocs/docs/pages/home/home/Filebrowser.png b/workspaces/redis-workspace/mkdocs/docs/assets/home/Filebrowser.png similarity index 100% rename from workspaces/redis-workspace/mkdocs/docs/pages/home/home/Filebrowser.png rename to workspaces/redis-workspace/mkdocs/docs/assets/home/Filebrowser.png diff --git a/workspaces/redis-workspace/mkdocs/docs/pages/home/home/Htop.jpg b/workspaces/redis-workspace/mkdocs/docs/assets/home/Htop.jpg similarity index 100% rename from workspaces/redis-workspace/mkdocs/docs/pages/home/home/Htop.jpg rename to workspaces/redis-workspace/mkdocs/docs/assets/home/Htop.jpg diff --git a/workspaces/redis-workspace/mkdocs/docs/pages/home/home/IDE.jpg b/workspaces/redis-workspace/mkdocs/docs/assets/home/IDE.jpg similarity index 100% rename from workspaces/redis-workspace/mkdocs/docs/pages/home/home/IDE.jpg rename to workspaces/redis-workspace/mkdocs/docs/assets/home/IDE.jpg diff --git a/workspaces/redis-workspace/mkdocs/docs/pages/home/home/MC.jpg b/workspaces/redis-workspace/mkdocs/docs/assets/home/MC.jpg similarity index 100% rename from workspaces/redis-workspace/mkdocs/docs/pages/home/home/MC.jpg rename to workspaces/redis-workspace/mkdocs/docs/assets/home/MC.jpg diff --git a/workspaces/redis-workspace/mkdocs/docs/pages/home/home/MkDocs.png b/workspaces/redis-workspace/mkdocs/docs/assets/home/MkDocs.png similarity index 100% rename from workspaces/redis-workspace/mkdocs/docs/pages/home/home/MkDocs.png rename to workspaces/redis-workspace/mkdocs/docs/assets/home/MkDocs.png diff --git a/workspaces/redis-workspace/mkdocs/docs/pages/home/home/Redis-commander.png b/workspaces/redis-workspace/mkdocs/docs/assets/home/Redis-commander.png similarity index 100% rename from workspaces/redis-workspace/mkdocs/docs/pages/home/home/Redis-commander.png rename to workspaces/redis-workspace/mkdocs/docs/assets/home/Redis-commander.png diff --git a/workspaces/redis-workspace/mkdocs/docs/pages/home/home/Static-server.png b/workspaces/redis-workspace/mkdocs/docs/assets/home/Static-server.png similarity index 100% rename from workspaces/redis-workspace/mkdocs/docs/pages/home/home/Static-server.png rename to workspaces/redis-workspace/mkdocs/docs/assets/home/Static-server.png diff --git a/workspaces/redis-workspace/mkdocs/docs/pages/home/home/Terminal.png b/workspaces/redis-workspace/mkdocs/docs/assets/home/Terminal.png similarity index 100% rename from workspaces/redis-workspace/mkdocs/docs/pages/home/home/Terminal.png rename to workspaces/redis-workspace/mkdocs/docs/assets/home/Terminal.png diff --git a/workspaces/redis-workspace/mkdocs/docs/pages/home/home/Ungit.jpg b/workspaces/redis-workspace/mkdocs/docs/assets/home/Ungit.jpg similarity index 100% rename from workspaces/redis-workspace/mkdocs/docs/pages/home/home/Ungit.jpg rename to workspaces/redis-workspace/mkdocs/docs/assets/home/Ungit.jpg diff --git a/workspaces/redis-workspace/mkdocs/docs/pages/home/home.md b/workspaces/redis-workspace/mkdocs/docs/pages/home/home.md deleted file mode 100644 index 59c3da8..0000000 --- a/workspaces/redis-workspace/mkdocs/docs/pages/home/home.md +++ /dev/null @@ -1,133 +0,0 @@ - - - -{% - 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/mkdocs.yml b/workspaces/redis-workspace/mkdocs/mkdocs.yml index 5293b59..548a6e2 100644 --- a/workspaces/redis-workspace/mkdocs/mkdocs.yml +++ b/workspaces/redis-workspace/mkdocs/mkdocs.yml @@ -3,9 +3,8 @@ # =========================================================== nav: - - Home: pages/home/home.md - - About: README.md - - Docs: docs.md + - Home: README.md + - Get started: getting-started.md # =========================================================== diff --git a/workspaces/sqlite-workspace/README.md b/workspaces/sqlite-workspace/README.md index 0b5cf11..8359ca7 100644 --- a/workspaces/sqlite-workspace/README.md +++ b/workspaces/sqlite-workspace/README.md @@ -1,237 +1,74 @@ +

+ Alnoda logo +

+ # SQLite Workspace -Collection of tools to develop SQLite databases. Useful if you need to create an embedded database for your application, -and fill it with data. +Collection of tools to develop SQLite databases. -Helps to get started fast locally, because SQLite and toolset are already installed and configured. It is only needed -to start a container. +## Why this images -Also can be self-hosted and used for collaboration when developing embedded database. - -__Try it out:__ +1. If you need to develop embedded SQLite database and fill it with data. +## Start + ``` docker run --name space-1 -d -p 8020-8035:8020-8035 alnoda/sqlite-workspace -``` -Open [localhost:8020](http://localhost:8020) +``` +and open [localhost:8020](http://localhost:8020) in browser. ## Features -__SQLite Features:__ +**SQLite tools:** -1. [sqlean](https://github.com/nalgeon/sqlean). The ultimate set of compiled SQLite extensions. -2. [nocodb](https://docs.nocodb.com/). Great UI to fill SQLite with data. NocoDB is an open source Airtable alternative. -3. [sqlite-web](https://github.com/coleifer/sqlite-web). Web-based SQLite database browser. -4. [litecli](https://github.com/dbcli/litecli). CLI for SQLite. -5. [sqlite-viewer](https://github.com/inloop/sqlite-viewer). View SQLite file online. -6. [Web-GUI-for-SQLite](https://github.com/cyrilbois/Web-GUI-for-SQLite). Alternative tool to view SQLite file online. -7. [DBdesigner](https://github.com/akreienbring/dbdesigner). Draw ERD diagrams and use it to generate DDL code. -8. [tbls](https://github.com/k1LoW/tbls). Generate documentation (essentially data catalog) from the database +- [nocodb](https://docs.nocodb.com/) - great UI to fill SQLite with data. NocoDB is an open source Airtable alternative. +- [sqlite-web](https://github.com/coleifer/sqlite-web) - web-based SQLite database browser. +- [sqlean](https://github.com/nalgeon/sqlean) - the ultimate set of compiled SQLite extensions. +- [litecli](https://github.com/dbcli/litecli) - CLI for SQLite. +- [sqlite-viewer](https://github.com/inloop/sqlite-viewer) - view SQLite file online. +- [Web-GUI-for-SQLite](https://github.com/cyrilbois/Web-GUI-for-SQLite) - alternative tool to view SQLite file online. +- [DBdesigner](https://github.com/akreienbring/dbdesigner) - draw ERD diagrams and use it to generate DDL code. +- [tbls](https://github.com/k1LoW/tbls) - gnerate documentation (essentially data catalog) from the database -__Workspace Features:__ +**SQLite extension:** -1. [Browser-based VS-code](https://theia-ide.org/) with extensions: - - [PostgreSQL Client for vscode](https://open-vsx.org/extension/cweijan/vscode-postgresql-client2) - - [SQLTools PostgreSQL](https://open-vsx.org/extension/mtxr/sqltools-driver-pg) -2. Browser-based terminal. Finally no need to ssh into a running docker container. -3. [Cronicle](https://github.com/jhuckaby/Cronicle). Browser-based jobs scheduler. Schedule backups, data extracts, maintenance scripts. -4. Ubuntu with many apps installed: - - text editors - - [Zsh](https://ohmyz.sh/) - - cron - - mc - - and many more -5. [Rclone](https://rclone.org/). Save SQLite databases to S3. -6. Programming languages. Develop/execute directly inside the workspace using browser-based IDE. - - python - - nodejs -7. [Filebrowser](https://github.com/filebrowser/filebrowser). Browse and download files (finally no need to mount folders for that). -8. [Static file server](https://github.com/vercel/serve). View generated HTML reports. -9. [Ungit](https://github.com/FredrikNoren/ungit). The easiest way to use git. -10. Browser-based process and resource utilization monitor -11. [Mkdocs](https://www.mkdocs.org/). Create documentation with Markdown. -12. Workspace own UI, from which you can open all applications and documentation. +- [crypto](https://github.com/nalgeon/sqlean/blob/main/docs/crypto.md) - secure hashes +- [fileio](https://github.com/nalgeon/sqlean/blob/main/docs/fileio.md) - read and write files +- [fuzzy](https://github.com/nalgeon/sqlean/blob/main/docs/fuzzy.md) - fuzzy string matching and phonetics +- [ipaddr](https://github.com/nalgeon/sqlean/blob/main/docs/ipaddr.md): - IP address manipulation +- [re](https://github.com/nalgeon/sqlean/blob/main/docs/re.md) - regular expressions +- [stats](https://github.com/nalgeon/sqlean/blob/main/docs/stats.md) - math statistics +- [text](https://github.com/nalgeon/sqlean/blob/main/docs/text.md) - string functions +- [unicode](https://github.com/nalgeon/sqlean/blob/main/docs/unicode.md) - Unicode support +- [uuid](https://github.com/nalgeon/sqlean/blob/main/docs/uuid.md) - universally Unique IDentifiers -## Get started +**Dev tools:** -### NocoDB +- [**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 +- [**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 -[NocoDB](https://docs.nocodb.com/). NocoDB is an open source Airtable alternative. Use it to create SQLite tables, develop databases -without SQL. +Image is built from **Ubuntu 20.4** with the additional CLI apps -Launch the workspace, navigate to the Workspace UI and open NocoDB. Or open [localhost:8030](http://localhost:8030/) directly in browser. -Create new user (provide any email,pass). Create tables, enter data, import data files, create forms and much more. +- [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 -#### query NocoDB data -NocoDB is backed by SQLite3, database file `/home/nocodb/noco.db `. - -You can query NocoDB databse directly with sqlite-web. Open it through the Workspace UI, or navigate to [localhost:8031](http://localhost:8031/) directly. - -At any moment you can copy SQLite database from NocoDB with all the data, edit, modify and configure for the needs of your application. -- Copy of NocoDB database and continue developing with Sqlite-web -``` -mv -f /home/nocodb/noco.db /home/project/sqlite-db/db-main.sqlite -``` -Open Sqlite-web on [localhost:8032](http://localhost:8032/) - -#### NocoDB with another SQLite database - -If yopu create NocoDB project with external database, tables created by NocoDB will not have prefixes. - -For example, create project with the example Chinook SQLite database file `/home/static-server/sqlite-viewer/examples/Chinook_Sqlite.sqlite`, -and query data also with sqlite-web on [localhost:8033](http://localhost:8033/). - -Or create NocoDB project with external SQLite database file `/home/project/sqlite-db/db-main.sqlite` and query with sqlite-web on [localhost:8032](http://localhost:8032/). - - -### Sqlite - -SQLite3 is installed. Open terminal [http://localhost:8026/](http://localhost:8026/) and execute - -``` -sqlite3 -``` - -__Note:__ tcheck out a better CLI [litecli](#litecli) - - -### Sqlite extensions - -The following compiled extensions are present in the folder `/home/sqlite-extensions` - -- [crypto](https://github.com/nalgeon/sqlean/blob/main/docs/crypto.md): secure hashes -- [fileio](https://github.com/nalgeon/sqlean/blob/main/docs/fileio.md): read and write files -- [fuzzy](https://github.com/nalgeon/sqlean/blob/main/docs/fuzzy.md): fuzzy string matching and phonetics -- [ipaddr](https://github.com/nalgeon/sqlean/blob/main/docs/ipaddr.md): IP address manipulation -- [re](https://github.com/nalgeon/sqlean/blob/main/docs/re.md): regular expressions -- [stats](https://github.com/nalgeon/sqlean/blob/main/docs/stats.md): math statistics -- [text](https://github.com/nalgeon/sqlean/blob/main/docs/text.md): string functions -- [unicode](https://github.com/nalgeon/sqlean/blob/main/docs/unicode.md): Unicode support -- [uuid](https://github.com/nalgeon/sqlean/blob/main/docs/uuid.md): Universally Unique IDentifiers - -Example start SQLite, and load extension: - -``` -sqlite3 -.load /home/sqlite-extensions/stats -``` - -### [sqlite-web](https://github.com/coleifer/sqlite-web) - -Serve any SQLite database. There are 2 SQlite database served by default: -- NocoDB database. Sqlite-web is served on [localhost:8031](http://localhost:8031/) -- "Main" database. Empty SQlite3 database. Sqlite-web is served on [localhost:8032](http://localhost:8032/) -- "Example/test" database. Filled with test "Chinook" database. Sqlite-web is served on [localhost:8033](http://localhost:8033/) - - -#### Copy SQlite databases -SQlite is just a file, jou can copy it and replace other databases. For example, if you want to copy NocoDB database -into the "Main" database, which is served by Sqlite-web on [localhost:8032](http://localhost:8032/) simply execute -``` -mv -f /home/nocodb/noco.db /home/project/sqlite-db/db-main.sqlite -``` - -#### Serve on-demand SQlite database -One port 8034 is reserved for serving on-demand database with Sqlite-web. -Serve it with the following command -``` -sqlite_web --host 0.0.0.0 --port 8034 -``` - -Example, start sqlite-web on port 8034 for SQLite database file `/home/static-server/sqlite-viewer/examples/Chinook_Sqlite.sqlite` - -``` -sqlite_web /home/static-server/sqlite-viewer/examples/Chinook_Sqlite.sqlite --host 0.0.0.0 --port 8034 -``` - -and with extensions loaded: - -``` -sqlite_web /home/static-server/sqlite-viewer/examples/Chinook_Sqlite.sqlite --host 0.0.0.0 --port 8034 -e /home/sqlite-extensions/text.so -e /home/sqlite-extensions/unicode.so -e /home/sqlite-extensions/uuid.so -``` - -### [sqlite-viewer](https://github.com/inloop/sqlite-viewer). View SQLite file online. - -Upload SQLite database file (from your local machine) and explore. - - -### [Web-GUI-for-SQLite](https://github.com/cyrilbois/Web-GUI-for-SQLite) - -Upload SQLite database file (from your local machine) and explore. - - -### [litecli](https://github.com/dbcli/litecli) -A command-line client for SQLite databases that has auto-completion and syntax highlighting. Useful if you prefer CLI. - -Open Terminal and try with example database: - -``` -litecli /home/static-server/sqlite-viewer/examples/Chinook_Sqlite.sqlite -``` - -Load extensions - -``` -.load /home/sqlite-extensions/stats -``` - - -## Advanced - -### SQLite Json -Examples - -``` -CREATE TABLE jsontest ( - id INTEGER NOT NULL PRIMARY KEY, - jss JSON -); - -INSERT INTO jsontest VALUES -(1, json(' { "key1" : "my key 1", "key2": [ "test" ] } ')), -(2, json(' { "key1" : "my new key", "key2": [ "test", "test" ] } ')), -(3, json(' { "key1" : "my yet another key", "key2": [ "test", "test", "test2" ] } ')); - -SELECT * FROM jsontest; -``` - -__Links:__ - - [Complete SQlite JSON docs](https://www.sqlite.org/json1.html#jmini) - - -### rclone -[rclone](https://rclone.org/) is a command line program to manage files on cloud storage. -It is a feature rich alternative to cloud vendors' web storage interfaces. -__Copy dump to S3:__ -Create file `~/.config/rclone/rclone.conf` with the following content -``` -[remote] -type = s3 -provider = AWS -access_key_id = XXXXXXXXXXXXXXXXXXXXXX -secret_access_key = XXxxXXxXXXxxxXXxXXXxxXXXxxxXXXxXXXX -region = xx-xxxx-x -``` -Use Rclone to copy to S3 and delete from local -``` -rclone move /home/project/sqlite-db remote:my-s3-bucket/sqlite/ -``` -__Restore from S3 to local:__ -When there is a need to get database from S3 to local folder. -``` -# copy -rclone copy remote:my-s3-bucket/sqlite/ /home/sqlite-db/ -# mount S3 without copying -rclone sync remote:my-s3-bucket/sqlite/ /home/sqlite-db/ -``` - -### tbls - -Generate docs for the example database - -``` -tbls doc sqlite:////home/static-server/sqlite-viewer/examples/Chinook_Sqlite.sqlite /home/static-server/sql-tbls -``` - -and view SVG files with Static File Server \ No newline at end of file +## Docs +See our guides on [**getting started**](docs/getting-started.md) and [**advanced features**](../ubuntu-workspace/docs/workspaces.md). diff --git a/workspaces/sqlite-workspace/docs/getting-started.md b/workspaces/sqlite-workspace/docs/getting-started.md new file mode 100644 index 0000000..2d56a51 --- /dev/null +++ b/workspaces/sqlite-workspace/docs/getting-started.md @@ -0,0 +1,205 @@ +# Get started + +This doc has examples how to use workspace toolset to develop and fill SQLite databases. + +Open Quickstart page [http://localhost:800/](http://localhost:8020/) for quick access to all the tools + +

+ Redis WID +

+ +Use workspace terminal [http://localhost:8026/](http://localhost:8026/) for CLI commands. + +## NocoDB + +[NocoDB](https://docs.nocodb.com/). NocoDB is an open source Airtable alternative. Use it to create SQLite tables, develop databases +without SQL. + +Launch the workspace, navigate to the Workspace UI and open NocoDB. Or open [localhost:8030](http://localhost:8030/) directly in browser. +Create new user (provide any email,pass). Create tables, enter data, import data files, create forms and much more. + +### query NocoDB data + +NocoDB is backed by SQLite3, database file `/home/nocodb/noco.db `. + +You can query NocoDB databse directly with sqlite-web. Open it through the Workspace UI, or navigate to [localhost:8031](http://localhost:8031/) directly. + +At any moment you can copy SQLite database from NocoDB with all the data, edit, modify and configure for the needs of your application. +- Copy of NocoDB database and continue developing with Sqlite-web +``` +mv -f /home/nocodb/noco.db /home/project/sqlite-db/db-main.sqlite +``` +Open Sqlite-web on [localhost:8032](http://localhost:8032/) + +### NocoDB with another SQLite database + +If yopu create NocoDB project with external database, tables created by NocoDB will not have prefixes. + +For example, create project with the example Chinook SQLite database file `/home/static-server/sqlite-viewer/examples/Chinook_Sqlite.sqlite`, +and query data also with sqlite-web on [localhost:8033](http://localhost:8033/). + +Or create NocoDB project with external SQLite database file `/home/project/sqlite-db/db-main.sqlite` and query with sqlite-web on [localhost:8032](http://localhost:8032/). + +## Sqlite + +SQLite3 is installed. Open terminal [http://localhost:8026/](http://localhost:8026/) and execute + +``` +sqlite3 +``` + +__Note:__ tcheck out a better CLI [litecli](#litecli) + +### Sqlite extensions + +The following compiled extensions are present in the folder `/home/sqlite-extensions` + +- [crypto](https://github.com/nalgeon/sqlean/blob/main/docs/crypto.md): secure hashes +- [fileio](https://github.com/nalgeon/sqlean/blob/main/docs/fileio.md): read and write files +- [fuzzy](https://github.com/nalgeon/sqlean/blob/main/docs/fuzzy.md): fuzzy string matching and phonetics +- [ipaddr](https://github.com/nalgeon/sqlean/blob/main/docs/ipaddr.md): IP address manipulation +- [re](https://github.com/nalgeon/sqlean/blob/main/docs/re.md): regular expressions +- [stats](https://github.com/nalgeon/sqlean/blob/main/docs/stats.md): math statistics +- [text](https://github.com/nalgeon/sqlean/blob/main/docs/text.md): string functions +- [unicode](https://github.com/nalgeon/sqlean/blob/main/docs/unicode.md): Unicode support +- [uuid](https://github.com/nalgeon/sqlean/blob/main/docs/uuid.md): Universally Unique IDentifiers + +Example start SQLite, and load extension: + +``` +sqlite3 +.load /home/sqlite-extensions/stats +``` + +### Copy SQlite databases + +SQlite is just a file, jou can copy it and replace other databases. For example, if you want to copy NocoDB database +into the "Main" database, which is served by Sqlite-web on [localhost:8032](http://localhost:8032/) simply execute + +``` +mv -f /home/nocodb/noco.db /home/project/sqlite-db/db-main.sqlite +``` + +## [sqlite-web](https://github.com/coleifer/sqlite-web) + +Serve any SQLite database. There are 2 SQlite database served by default: + +- NocoDB database. Sqlite-web is served on [localhost:8031](http://localhost:8031/) +- "Main" database. Empty SQlite3 database. Sqlite-web is served on [localhost:8032](http://localhost:8032/) +- "Example/test" database. Filled with test "Chinook" database. Sqlite-web is served on [localhost:8033](http://localhost:8033/) + +### Serve on-demand SQlite database + +One port 8034 is reserved for serving on-demand database with Sqlite-web. +Serve it with the following command + +``` +sqlite_web --host 0.0.0.0 --port 8034 +``` + +Example, start sqlite-web on port 8034 for SQLite database file `/home/static-server/sqlite-viewer/examples/Chinook_Sqlite.sqlite` + +``` +sqlite_web /home/static-server/sqlite-viewer/examples/Chinook_Sqlite.sqlite --host 0.0.0.0 --port 8034 +``` + +and with extensions loaded: + +``` +sqlite_web /home/static-server/sqlite-viewer/examples/Chinook_Sqlite.sqlite --host 0.0.0.0 --port 8034 -e /home/sqlite-extensions/text.so -e /home/sqlite-extensions/unicode.so -e /home/sqlite-extensions/uuid.so +``` + +## [sqlite-viewer](https://github.com/inloop/sqlite-viewer). + +Explore and query SQLite databases. Upload SQLite database file (from your local machine) and explore. + + +## [Web-GUI-for-SQLite](https://github.com/cyrilbois/Web-GUI-for-SQLite) + +Explore and query SQLite databases. Upload SQLite database file (from your local machine) and explore. + + +## [litecli](https://github.com/dbcli/litecli) + +A command-line client for SQLite databases that has auto-completion and syntax highlighting. Useful if you prefer CLI. + +Open Terminal and try with example database: + +``` +litecli /home/static-server/sqlite-viewer/examples/Chinook_Sqlite.sqlite +``` + +Load extensions + +``` +.load /home/sqlite-extensions/stats +``` + +### Tbls + +Generate docs for the example database + +``` +tbls doc sqlite:////home/static-server/sqlite-viewer/examples/Chinook_Sqlite.sqlite /home/static-server/sql-tbls +``` + +and view SVG files with Static File Server + + +## Advanced + +### SQLite Json + +Examples + +``` +CREATE TABLE jsontest ( + id INTEGER NOT NULL PRIMARY KEY, + jss JSON +); + +INSERT INTO jsontest VALUES +(1, json(' { "key1" : "my key 1", "key2": [ "test" ] } ')), +(2, json(' { "key1" : "my new key", "key2": [ "test", "test" ] } ')), +(3, json(' { "key1" : "my yet another key", "key2": [ "test", "test", "test2" ] } ')); + +SELECT * FROM jsontest; +``` + +__Links:__ + - [Complete SQlite JSON docs](https://www.sqlite.org/json1.html#jmini) + + +### Rclone + +[rclone](https://rclone.org/) is a command line program to manage files on cloud storage. +It is a feature rich alternative to cloud vendors' web storage interfaces. + +__Copy dump to S3:__ +Create file `~/.config/rclone/rclone.conf` with the following content + +``` +[remote] +type = s3 +provider = AWS +access_key_id = XXXXXXXXXXXXXXXXXXXXXX +secret_access_key = XXxxXXxXXXxxxXXxXXXxxXXXxxxXXXxXXXX +region = xx-xxxx-x +``` + +Use Rclone to copy to S3 and delete from local + +``` +rclone move /home/project/sqlite-db remote:my-s3-bucket/sqlite/ +``` + +__Restore from S3 to local:__ +When there is a need to get database from S3 to local folder. + +``` +# copy +rclone copy remote:my-s3-bucket/sqlite/ /home/sqlite-db/ +# mount S3 without copying +rclone sync remote:my-s3-bucket/sqlite/ /home/sqlite-db/ +``` +