PromucFlow_constructor/deploy/docker/fs/opt/appsmith
Shrikant Sharat Kandula 164d2e6b65
ci: Use esbuild to build RTS (#27310)
This fixes RTS build to use `esbuild`.

1. This means the whole `node_modules` won't need to be copied over to
the Docker image. There's unused insignifant _test_ files in there, that
don't add any value, but are causing irrelevant CVEs to be reported on
our Docker image. See example at
https://github.com/appsmithorg/appsmith-ee/pull/2349.

2. Much faster. Not that RTS build is our slow point, but still. Perhaps
we can move client to `esbuild` too. 🙂

## Why are we doing this?

The current method of loading RTS into the Docker image means that _all_
contents of _all_ dependencies are copied over. The whole
`node_modules`. But several of these packages include _test_ files too,
that aren't needed at runtime at all. One of such test files is creating
a false alert for a CVE on our Docker image. Has absolutely no relevance
and impact, but it's there.

To fix that, I [had to `rm -rf /opt/appsmith/rts/node_modules/*/test` in
the Docker
image](https://github.com/appsmithorg/appsmith-ee/pull/2349/files). This
felt very hacky, and very dirty. It felt like we're introducing more
debt and more duct tape around the current build process.

So, `esbuild`.

## Where is `esbuild` coming from?

We're using `esbuild` v0.18.20 only, while the latest is v0.19.3. We
need to update `design-system`'s storybook dependency, I think, to get a
more recent version of `esbuild`. I'm yet to figure this out and can use
some help. 🙂
2023-10-03 07:00:40 +05:30
..
templates ci: Use esbuild to build RTS (#27310) 2023-10-03 07:00:40 +05:30
utils chore: Use single COPY command in Dockerfile for constant/static files (#27127) 2023-09-11 08:43:09 +05:30
entrypoint.sh chore: Run NGINX with readonly root FS support (#27453) 2023-09-27 13:38:47 +05:30
healthcheck.sh chore: Use single COPY command in Dockerfile for constant/static files (#27127) 2023-09-11 08:43:09 +05:30
init_ssl_cert.sh chore: Run NGINX with readonly root FS support (#27453) 2023-09-27 13:38:47 +05:30
install_docker.sh chore: Use single COPY command in Dockerfile for constant/static files (#27127) 2023-09-11 08:43:09 +05:30
prepare-image.mjs chore: Run NGINX with readonly root FS support (#27453) 2023-09-27 13:38:47 +05:30
pull_resource.sh chore: Use single COPY command in Dockerfile for constant/static files (#27127) 2023-09-11 08:43:09 +05:30
renew-certificate.sh chore: Use single COPY command in Dockerfile for constant/static files (#27127) 2023-09-11 08:43:09 +05:30
run-java.sh fix: Fix backend failing to start when running with a custom PORT (#27461) 2023-09-20 10:27:54 +05:30
run-nginx.sh chore: Run NGINX with readonly root FS support (#27453) 2023-09-27 13:38:47 +05:30
run-postgres.sh fix: Use temporary directory for embedded postgres stats data (#27455) 2023-09-27 11:35:43 +05:30
run-starting-page-init.sh chore: Run NGINX with readonly root FS support (#27453) 2023-09-27 13:38:47 +05:30
run-with-env.sh chore: Use single COPY command in Dockerfile for constant/static files (#27127) 2023-09-11 08:43:09 +05:30
start_app.sh chore: Use single COPY command in Dockerfile for constant/static files (#27127) 2023-09-11 08:43:09 +05:30
starting-page-init.py chore: Run NGINX with readonly root FS support (#27453) 2023-09-27 13:38:47 +05:30
update-and-restart-supervisor.sh chore: Use single COPY command in Dockerfile for constant/static files (#27127) 2023-09-11 08:43:09 +05:30