nocodb (sqlite3 wrk) moved to home

This commit is contained in:
bluxmit 2022-03-22 10:43:41 +00:00
parent 87b98aca70
commit 2011454b23
3 changed files with 24 additions and 13 deletions

View file

@ -32,10 +32,11 @@ RUN echo "------------------------------------------------------ sqlite3" \
&& rm /tmp/sqlite-autoconf-3350400.tar.gz \
&& rm -rf /tmp/sqlite-autoconf-3350400 \
&& echo "------------------------------------------------------ nocodb" \
&& cd /; mkdir /opt/nocodb/ \
&& git clone https://github.com/nocodb/nocodb-seed /opt/nocodb/ \
&& cd /opt/nocodb && nodeenv --node=12.18.3 --npm=6.0.0 env \
&& cd /opt/nocodb && . env/bin/activate && npm install \
&& cd /; mkdir /home/nocodb/ \
&& git clone https://github.com/nocodb/nocodb-seed /home/nocodb/ \
&& cd /home/nocodb && nodeenv --node=12.18.3 --npm=6.0.0 env \
&& cd /home/nocodb && . env/bin/activate && npm install \
&& rm -rf /home/nocodb/.git \
&& echo "------------------------------------------------------ cli" \
&& pip install litecli==1.7.0 \
&& echo "------------------------------------------------------ rclone" \
@ -76,7 +77,7 @@ RUN echo "------------------------------------------------------ sqlite3" \
&& chown -R abc /opt/dbdesigner \
&& mkdir /var/log/dbdesigner && chown -R abc /var/log/dbdesigner \
&& mkdir /var/log/sqlite-web && chown -R abc /var/log/sqlite-web \
&& chown -R abc /opt/nocodb \
&& chown -R abc /home/nocodb \
&& mkdir /var/log/nocodb && chown -R abc /var/log/nocodb \
&& echo "export PAGER='pspg -s 4 --no-mouse'" >> /home/abc/.zshrc \
&& find /home -type d | xargs -I{} chown -R abc {} \

View file

@ -62,17 +62,27 @@ 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.
NocoDB is backed by SQLite3, database file `/opt/nocodb/noco.db `.
#### 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 /opt/nocodb/noco.db /home/project/sqlite-db/db-main.sqlite
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
@ -114,14 +124,14 @@ Serve any SQLite database. There are 2 SQlite database served by default:
- "Example/test" database. Filled with test "Chinook" database. Sqlite-web is served on [localhost:8033](http://localhost:8033/)
__Copy SQlite databases__
#### 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 /opt/nocodb/noco.db /home/project/sqlite-db/db-main.sqlite
mv -f /home/nocodb/noco.db /home/project/sqlite-db/db-main.sqlite
```
__Serve on-demand SQlite database__
#### Serve on-demand SQlite database
One port 8034 is reserved for serving on-demand database with Sqlite-web.
Serve it with the following command
```

View file

@ -15,8 +15,8 @@ logfile_maxbytes = 1024
[program:nocodb]
directory=/opt/nocodb
command=/bin/sh -c "cd /opt/nocodb && . env/bin/activate && npm start" # port is defined by PORT env var
directory=/home/nocodb
command=/bin/sh -c "cd /home/nocodb && . env/bin/activate && npm start" # port is defined by PORT env var
stderr_logfile = /var/log/nocodb/nocodb-stderr.log
stdout_logfile = /var/log/nocodb/nocodb-stdout.log
logfile_maxbytes = 1024
@ -24,7 +24,7 @@ logfile_maxbytes = 1024
[program:sqlite-web-nocodb]
directory=/home/project/
command=/bin/sh -c "sqlite_web /opt/nocodb/noco.db --host 0.0.0.0 --port 8031 --no-browser -e /home/sqlite-extensions/fileio.so -e /home/sqlite-extensions/fuzzy.so -e /home/sqlite-extensions/ipaddr.so -e /home/sqlite-extensions/re.so -e /home/sqlite-extensions/spellfix.so -e /home/sqlite-extensions/stats.so -e /home/sqlite-extensions/text.so -e /home/sqlite-extensions/unicode.so -e /home/sqlite-extensions/uuid.so "
command=/bin/sh -c "sqlite_web /home/nocodb/noco.db --host 0.0.0.0 --port 8031 --no-browser -e /home/sqlite-extensions/fileio.so -e /home/sqlite-extensions/fuzzy.so -e /home/sqlite-extensions/ipaddr.so -e /home/sqlite-extensions/re.so -e /home/sqlite-extensions/spellfix.so -e /home/sqlite-extensions/stats.so -e /home/sqlite-extensions/text.so -e /home/sqlite-extensions/unicode.so -e /home/sqlite-extensions/uuid.so "
stderr_logfile = /var/log/sqlite-web/sqlite-noco-stderr.log
stdout_logfile = /var/log/sqlite-web/sqlite-noco-stdout.log
logfile_maxbytes = 1024