Comments (8)
@pranavxc I've submitted #8439, please have a look.
from nocodb.
@pranavxc Extracting on the first run is unfavorable in the case of a containerized app since the extraction is repeated on every container restart (unless
/usr/src/appEntry
lives on persistent storage), which delays startup. And by adding a tar archive in the container image to be extracted at run-time, you actually _in_crease the storage requirements for the app at run-time.I'm successfully using the above approach with the official Docker image, i.e.
FROM nocodb/nocodb:latest RUN tar -xzf /usr/src/appEntry/app.tar.gz -C /usr/src/app/ && rm -f /usr/src/appEntry/app.tar.gz COPY --link --chown=0:0 mystartup.sh /usr/src/appEntry/start.sh(where
mystartup.sh
is the customizedstart-litestream.sh
)so I think it should work in general.
Would you welcome a PR?
Your concerns make sense, I will have a look at the Dockerfile and get back to you. Skipping compressing will increase the overall image size slightly and other than that no issues are there but I will double-check.
from nocodb.
Regarding the
non-root
part, I'm concerned about existing users who have already mounted volumes if they migrate to the version where we're utilizing anon-root
user.
One way could be to just allow for easy non-root user usage. That way it's up to the user to migrate - if they want.
But I think with good upgrade instructions it would not be that bad either. In the end it's just a chown
- which maybe could even be baked into the Dockerfile. And nocodb
is still pre 1.0. In the long run it certainly would be better to run as non-root.
from nocodb.
TBH I am not quite sure why an un-tar would be necessary at container startup at runtime over build time.
It is not. Simply removing the untar (also from the other start scripts)
nocodb/packages/nocodb/docker/start-litestream.sh
Lines 27 to 30 in 08dfcfa
and adding the following line to the Dockerfile at this position should suffice.
RUN tar -xzf /usr/src/appEntry/app.tar.gz -C /usr/src/app/ && rm -f /usr/src/appEntry/app.tar.gz
I wonder what @pranavxc thinks.
from nocodb.
TBH I am not quite sure why an un-tar would be necessary at container startup at runtime over build time.
It is not. Simply removing the untar (also from the other start scripts)
nocodb/packages/nocodb/docker/start-litestream.sh
Lines 27 to 30 in 08dfcfa
and adding the following line to the Dockerfile at this position should suffice.
RUN tar -xzf /usr/src/appEntry/app.tar.gz -C /usr/src/app/ && rm -f /usr/src/appEntry/app.tar.gz
I wonder what @pranavxc thinks.
We are keeping our build as a compressed tar file to reduce the overall size, on the first run we are extracting the build and then proceeding. We will check how we can make it support read-only
and non-root
options.
from nocodb.
@pranavxc Extracting on the first run is unfavorable in the case of a containerized app since the extraction is repeated on every container restart (unless /usr/src/appEntry
lives on persistent storage), which delays startup. And by adding a tar archive in the container image to be extracted at run-time, you actually increase the storage requirements for the app at run-time.
I'm successfully using the above approach with the official Docker image, i.e.
FROM nocodb/nocodb:latest
RUN tar -xzf /usr/src/appEntry/app.tar.gz -C /usr/src/app/ && rm -f /usr/src/appEntry/app.tar.gz
COPY --link --chown=0:0 mystartup.sh /usr/src/appEntry/start.sh
(where mystartup.sh
is the customized start-litestream.sh
)
so I think it should work in general.
Would you welcome a PR?
from nocodb.
@salim-b: I've reviewed it, and I suggest removing the compression part entirely from the Dockerfile and keeping the build in the extracted state. If you're interested in collaborating on this, please let me know, or I can handle this aspect. Regarding the non-root
part, I'm concerned about existing users who have already mounted volumes if they migrate to the version where we're utilizing a non-root
user.
from nocodb.
Please reopen this thread if you need further assistance
from nocodb.
Related Issues (20)
- 🐛 Bug: "connect a data source" is missing on 0.207.3(nocodb binary version) HOT 2
- 🐛 Bug: Function to Show/Hide M2M Junction tables has no effect HOT 2
- 🐛 Bug: Cell drag is not resulting in audit entries
- How to use/any experiences on SQLAlchemy Automap on NocoDB? / or how to disable Many-to-many relation separated table feature in NocoDB? HOT 1
- 🐛 Bug: Mobile iOS safari - add new record not visible HOT 2
- Bug : Form submission leads to an error when submitting the shared form if the column name has a '.' (dot) character.
- 🔦 Feature: Auto infer non-English column name when import data to existing table.(If exists this column name)
- 🔦 Feature: The color of scrollbar need to be more obvious.
- 🔦 Feature: Support changing `Show M2M Tables` and `Show NULL in Cells` base settings via RESTful API
- 🐛 Bug: Webhook delete payload is only visible columns HOT 1
- 🐛 Bug: After creating the project, the entry to create the data source cannot be found HOT 1
- 🐛 Bug: Escaping of '&' character prevents using URL field as clickable GET form which passes multiple parameters
- 🔦 Feature: Support for use of Lookup over attachment field as cover image in Gallery view
- 🐛 Bug: Metadata sync from MySQL ignores enum changes HOT 1
- 🐛 Bug: NocoDB API Snippets Broken HOT 2
- 🔦 Feature: Accept donations in Bitcoin and Bitcoin lightning
- Bug : Identifier name is too long when creating relation between tables
- 🐛 Bug: decimal precision display HOT 1
- 🐛 Bug: qrcode and barcode are not exported.
- 🔦 Feature: Export all the content of a table in only one csv/xls file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nocodb.