sqlite wrk docs

This commit is contained in:
bluxmit 2022-05-11 12:55:43 +00:00
parent 4961728dbc
commit 812f584824
35 changed files with 249 additions and 211 deletions

View file

@ -54,7 +54,7 @@ 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
COPY docs/getting-started.md /home/docs/docs/getting-started.md
ENV SHELL=/bin/bash \
THEIA_DEFAULT_PLUGINS=local-dir:/opt/theia/plugins \

View file

@ -9,7 +9,7 @@ USER root
COPY supervisord-sqlite.conf /etc/supervisord/
COPY mkdocs /home/docs
COPY README.md /home/docs/docs/docs.md
COPY docs/getting-started.md /home/docs/docs/getting-started.md
# apt-get install -y sqlite3 \

View file

@ -5,19 +5,45 @@ This doc has examples how to use workspace toolset to develop and fill SQLite da
Open Quickstart page [http://localhost:800/](http://localhost:8020/) for quick access to all the tools
<p align="center">
<img src="https://raw.githubusercontent.com/bluxmit/alnoda-workspaces/main/workspaces/redis-workspace/img/Redis-wid.png" alt="Redis WID" width="750">
<img src="https://raw.githubusercontent.com/bluxmit/alnoda-workspaces/main/workspaces/sqlite-workspace/img/sqlite-wid.png" alt="SQLITE WID" width="750">
</p>
Use workspace terminal [http://localhost:8026/](http://localhost:8026/) for CLI commands.
Use workspace terminal [http://localhost:8026/](http://localhost:8026/) for CLI commands.
Workspace conntains example SQLite database, the file `/home/static-server/sqlite-viewer/examples/Chinook_Sqlite.sqlite`
## NocoDB
[NocoDB](https://docs.nocodb.com/). NocoDB is an open source Airtable alternative. Use it to create SQLite tables, develop databases
without SQL.
without SQL.
NocoDB can also be used to fill SQLite databases with data with the help of nice interactive UI.
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.
### NocoDB with existing SQLite database
Create NocoDB project with an empty external SQLite database file `/home/project/sqlite-db/db-main.sqlite`.
<p align="center">
<img src="https://raw.githubusercontent.com/bluxmit/alnoda-workspaces/main/workspaces/sqlite-workspace/img/noco-new-main.png" alt="Noco new main" width="750">
</p>
Create some data, and explore it with Sqlite-web [localhost:8032](http://localhost:8032/)
<p align="center">
<img src="https://raw.githubusercontent.com/bluxmit/alnoda-workspaces/main/workspaces/sqlite-workspace/img/sqliteweb-main.gif" alt="Sqliteweb main" width="750">
</p>
You can also open existing SQLIte database, and edit it with NocoDB. Let's open example SQLite database `/home/static-server/sqlite-viewer/examples/Chinook_Sqlite.sqlite`
<p align="center">
<img src="https://raw.githubusercontent.com/bluxmit/alnoda-workspaces/main/workspaces/sqlite-workspace/img/noco-chinook.gif" alt="noco chinook" width="750">
</p>
### query NocoDB data
NocoDB is backed by SQLite3, database file `/home/nocodb/noco.db `.
@ -31,14 +57,6 @@ 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
@ -71,15 +89,26 @@ sqlite3
.load /home/sqlite-extensions/stats
```
### Upload & download SQLite databases
No matter if workspace is used locally, in cloud or kubernetes you can upload and download database files using file browser
<p align="center">
<img src="https://raw.githubusercontent.com/bluxmit/alnoda-workspaces/main/workspaces/sqlite-workspace/img/filebrowser-download.png" alt="Filebrowser" width="500">
</p>
### 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
into the "Main" database, which is served by Sqlite-web on [localhost:8032](http://localhost:8032/) simply execute in terminal
```
mv -f /home/nocodb/noco.db /home/project/sqlite-db/db-main.sqlite
```
You also can use file browser to move or copy files.
## [sqlite-web](https://github.com/coleifer/sqlite-web)
Serve any SQLite database. There are 2 SQlite database served by default:
@ -88,6 +117,11 @@ Serve any SQLite database. There are 2 SQlite database served by default:
- "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/)
<p align="center">
<img src="https://raw.githubusercontent.com/bluxmit/alnoda-workspaces/main/workspaces/sqlite-workspace/img/sqliteweb-chinook.gif" alt="sqliteweb chinook" width="750">
</p>
### Serve on-demand SQlite database
One port 8034 is reserved for serving on-demand database with Sqlite-web.
@ -113,11 +147,19 @@ sqlite_web /home/static-server/sqlite-viewer/examples/Chinook_Sqlite.sqlite --ho
Explore and query SQLite databases. Upload SQLite database file (from your local machine) and explore.
<p align="center">
<img src="https://raw.githubusercontent.com/bluxmit/alnoda-workspaces/main/workspaces/sqlite-workspace/img/sqlite-viewer.png" alt="sqlite viewer" width="500">
</p>
## [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.
<p align="center">
<img src="https://raw.githubusercontent.com/bluxmit/alnoda-workspaces/main/workspaces/sqlite-workspace/img/sqlite-web-gui.png" alt="sqlite web gui" width="500">
</p>
## [litecli](https://github.com/dbcli/litecli)
@ -129,6 +171,15 @@ Open Terminal and try with example database:
litecli /home/static-server/sqlite-viewer/examples/Chinook_Sqlite.sqlite
```
<p align="center">
<img src="https://raw.githubusercontent.com/bluxmit/alnoda-workspaces/main/workspaces/sqlite-workspace/img/litecli-1.png" alt="litecli" width="500">
</p>
<p align="center">
<img src="https://raw.githubusercontent.com/bluxmit/alnoda-workspaces/main/workspaces/sqlite-workspace/img/litecli-2.png" alt="litecli pager" width="500">
</p>
Load extensions
```
@ -145,6 +196,19 @@ tbls doc sqlite:////home/static-server/sqlite-viewer/examples/Chinook_Sqlite.sql
and view SVG files with Static File Server
<p align="center">
<img src="https://raw.githubusercontent.com/bluxmit/alnoda-workspaces/main/workspaces/sqlite-workspace/img/tbls.gif" alt="tbls" width="750">
</p>
### DB designer
With DB designer you can visually create ERD diagrams, and generate DDL SQL scripts
<p align="center">
<img src="https://raw.githubusercontent.com/bluxmit/alnoda-workspaces/main/workspaces/sqlite-workspace/img/dbdesigner.png" alt="db designer" width="500">
</p>
## Advanced

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 557 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 957 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 MiB

View file

@ -1,28 +1,178 @@
**This is a starting point to create docs for this workspace!**
<style>
/* These styles apply only to this page! */
.md-content__button {
display: none;
}
.md-sidebar--secondary{
display: none !important;
}
.md-typeset h1 {
line-height: 0;
margin: 0;
margin-left: -9999px;
}
.quickstart-wrapper {
min-width: 300px;
display: flex;
flex-wrap: wrap;
justify-content: center;
padding-left: -50px;
column-gap: 50px;
row-gap: 50px;
}
.quickstart-wrapper > div {
flex: 300px;
max-width: 300px;
}
.tool-img{
box-shadow: rgba(0, 0, 0, 0.24) 0px 5px 5px;
border-radius: 5px;
min-width: 300px;
max-width: 300px;
max-height: 170px;
min-height: 170px;
}
.tool-caption{
font-family: Roboto, Helvetica, sans-serif;
text-align: center;
margin-top: 10px;
font-size: 1.2rem;
font-weight: bold;
> 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.
/* font-size: 1.25em;
font-weight: 400; */
letter-spacing: -.02em;
line-height: 1.5;
}
.tool-description{
font-family: Helvetica, sans-serif;
text-align: center;
margin-top: 10px;
font-size: 0.7rem;
font-style: oblique;
/* font-weight: bold; */
}
</style>
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": "CRONICLE_URL",
"name": "Cronicle",
"image": "assets/home/Cronicle.jpg",
"description": "Schedule jobs, manage schedules, observe and monitor executions (user/pass - admin/admin)"
},
{
"env": "NOCODB_URL",
"name": "NocoDB",
"image": "assets/home/Nocodb.png",
"description": "Open source Airtable alternative. GUI for your SQLite database."
},
{
"env": "SQLITE_WEB_NOCODB",
"name": "SQLite database browser for NocoDB",
"image": "assets/home/db-test.jpg",
"description": "Explore and query SQLite database of NocoDB"
},
{
"env": "SQLITE_WEB_MAIN_URL",
"name": "SQLite database browser (main)",
"image": "assets/home/db-main.jpg",
"description": "Develop SQLite database with the help of WEB UI"
},
{
"env": "SQLITE_WEB_EXAMPLE_URL",
"name": "SQLite database browser (example)",
"image": "assets/home/db-example.jpg",
"description": "Example SQLite database with multiple extensions"
},
{
"env": "SQLITE_WEB_CUSTOM_URL",
"name": "SQLite database browser (custom)",
"image": "assets/home/db-custom.jpg",
"description": "Not started! Start manually with your SQLite database, i.e. <b>sqlite_web /home/static-server/sqlite-viewer/examples/Chinook_Sqlite.sqlite --host 0.0.0.0 --port 8034</b>"
},
{
"env": "DBDESIGNER_URL",
"name": "DB designer",
"image": "assets/home/dbdesigner.png",
"description": "Visual design tool for Entity Relationship Diagrams & SQL generator"
},
{
"env": "SQLITE_VIEWER_URL",
"name": "SQLite browser-based viewer",
"image": "assets/home/sqlite-viewer.jpg",
"description": "Upload local SQLite databses, explore and query data"
},
{
"env": "SQLITE_WEB_GUI_URL",
"name": "SQLite browser-based GUI",
"image": "assets/home/sqlite-gui.jpg",
"description": "Upload local SQLite databses, explore and query data"
},
{
"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`
<div class="quickstart-wrapper">
{% for tool in tools %}
{% set tool_url = get_tool_url(tool.env) %}
<div>
<a href="{{ tool_url }}" target="_blank" rel="noopener noreferrer">
<img src="{{ tool.image }}" class="tool-img"/>
</a>
<a href="{{ tool_url }}">
<div class="tool-caption">{{ tool.name }}</div>
</a>
<div class="tool-description">{{ tool.description }}</div>
</div>
{% endfor %}
</div>
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
```

View file

Before

Width:  |  Height:  |  Size: 250 KiB

After

Width:  |  Height:  |  Size: 250 KiB

View file

Before

Width:  |  Height:  |  Size: 124 KiB

After

Width:  |  Height:  |  Size: 124 KiB

View file

Before

Width:  |  Height:  |  Size: 142 KiB

After

Width:  |  Height:  |  Size: 142 KiB

View file

Before

Width:  |  Height:  |  Size: 192 KiB

After

Width:  |  Height:  |  Size: 192 KiB

View file

Before

Width:  |  Height:  |  Size: 108 KiB

After

Width:  |  Height:  |  Size: 108 KiB

View file

Before

Width:  |  Height:  |  Size: 652 KiB

After

Width:  |  Height:  |  Size: 652 KiB

View file

Before

Width:  |  Height:  |  Size: 294 KiB

After

Width:  |  Height:  |  Size: 294 KiB

View file

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 58 KiB

View file

Before

Width:  |  Height:  |  Size: 155 KiB

After

Width:  |  Height:  |  Size: 155 KiB

View file

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 94 KiB

View file

Before

Width:  |  Height:  |  Size: 161 KiB

After

Width:  |  Height:  |  Size: 161 KiB

View file

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 59 KiB

View file

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 60 KiB

View file

Before

Width:  |  Height:  |  Size: 218 KiB

After

Width:  |  Height:  |  Size: 218 KiB

View file

Before

Width:  |  Height:  |  Size: 128 KiB

After

Width:  |  Height:  |  Size: 128 KiB

View file

@ -1,175 +0,0 @@
<style>
/* These styles apply only to this page! */
.md-content__button {
display: none;
}
.md-typeset h1 {
line-height: 0;
margin: 0;
margin-left: -9999px;
}
.quickstart-wrapper {
min-width: 300px;
display: flex;
flex-wrap: wrap;
justify-content: center;
padding-left: -50px;
column-gap: 50px;
row-gap: 50px;
}
.quickstart-wrapper > div {
flex: 300px;
max-width: 300px;
}
.tool-img{
box-shadow: rgba(0, 0, 0, 0.24) 0px 5px 5px;
border-radius: 5px;
min-width: 300px;
max-width: 300px;
max-height: 170px;
min-height: 170px;
}
.tool-caption{
font-family: Roboto, Helvetica, sans-serif;
text-align: center;
margin-top: 10px;
font-size: 1.2rem;
font-weight: bold;
/* font-size: 1.25em;
font-weight: 400; */
letter-spacing: -.02em;
line-height: 1.5;
}
.tool-description{
font-family: Helvetica, sans-serif;
text-align: center;
margin-top: 10px;
font-size: 0.7rem;
font-style: oblique;
/* font-weight: bold; */
}
</style>
{%
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": "CRONICLE_URL",
"name": "Cronicle",
"image": "Cronicle.jpg",
"description": "Schedule jobs, manage schedules, observe and monitor executions (user/pass - admin/admin)"
},
{
"env": "NOCODB_URL",
"name": "NocoDB",
"image": "Nocodb.png",
"description": "Open source Airtable alternative. GUI for your SQLite database."
},
{
"env": "SQLITE_WEB_NOCODB",
"name": "SQLite database browser for NocoDB",
"image": "db-test.jpg",
"description": "Explore and query SQLite database of NocoDB"
},
{
"env": "SQLITE_WEB_MAIN_URL",
"name": "SQLite database browser (main)",
"image": "db-main.jpg",
"description": "Develop SQLite database with the help of WEB UI"
},
{
"env": "SQLITE_WEB_EXAMPLE_URL",
"name": "SQLite database browser (example)",
"image": "db-example.jpg",
"description": "Example SQLite database with multiple extensions"
},
{
"env": "SQLITE_WEB_CUSTOM_URL",
"name": "SQLite database browser (custom)",
"image": "db-custom.jpg",
"description": "Not started! Start manually with your SQLite database, i.e. <b>sqlite_web /home/static-server/sqlite-viewer/examples/Chinook_Sqlite.sqlite --host 0.0.0.0 --port 8034</b>"
},
{
"env": "DBDESIGNER_URL",
"name": "DB designer",
"image": "dbdesigner.png",
"description": "Visual design tool for Entity Relationship Diagrams & SQL generator"
},
{
"env": "SQLITE_VIEWER_URL",
"name": "SQLite browser-based viewer",
"image": "sqlite-viewer.jpg",
"description": "Upload local SQLite databses, explore and query data"
},
{
"env": "SQLITE_WEB_GUI_URL",
"name": "SQLite browser-based GUI",
"image": "sqlite-gui.jpg",
"description": "Upload local SQLite databses, explore and query data"
},
{
"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"
}
]
%}
<div class="quickstart-wrapper">
{% for tool in tools %}
{% set tool_url = get_tool_url(tool.env) %}
<div>
<a href="{{ tool_url }}" target="_blank" rel="noopener noreferrer">
<img src="{{ tool.image }}" class="tool-img"/>
</a>
<a href="{{ tool_url }}">
<div class="tool-caption">{{ tool.name }}</div>
</a>
<div class="tool-description">{{ tool.description }}</div>
</div>
{% endfor %}
</div>

View file

@ -3,9 +3,8 @@
# ===========================================================
nav:
- Home: pages/home/home.md
- About: README.md
- Docs: docs.md
- Home: README.md
- Get started: getting-started.md
# ===========================================================