appsmithorg / appsmith

Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
https://www.appsmith.com
Apache License 2.0
34.64k stars 3.74k forks source link

Script to do sanity checks on Appsmith Docker image #24270

Open sharat87 opened 1 year ago

sharat87 commented 1 year ago

There was a problem recently, where our CI pushed an Appsmith Docker image that didn't contain an index.html for NGINX to serve. Making the Docker image non-functional.

If we have a script that, when given an Appsmith Docker image, does a few sanity checks, like checking for an index.html in the right place, we can use this script in CI, on the image that was built, just before pushing it out.

Such a script can be used for images built for deploy-previews, images built locally even, that can highlight problems with an image much faster and earlier.

Some checks we can start with:

  1. Presence of index.html in the right place, and is non-empty.
  2. Presence of static asset files, JS/CSS etc.
  3. Presence of server.jar and plugin jars.
  4. Presence of entrypoint.sh in the right place.
  5. Presence of required template files.

Let's have this script at deploy/chece-image.sh.

Scope of this task is just to create this script. We'll add it to CI as part of a separate item.

devarsh10 commented 6 months ago

Hello @sharat87, I am excited to work on this issue. But, before starting I would like to confirm what I understood.

So, what I understood is,

We want to create a shell script that will check for the required files(like templates, JS, CSS files, or JAR files) used by an 'index.html' file.

If they exist(the required files), the CI pipeline will push the Docker Image to the known destination.

Kind Regards, Devarsh Shah.