Commit Graph

15 Commits

Author SHA1 Message Date
Shrikant Sharat Kandula
c467090c56
fix: Adding multiple certs in ca-certs folder (#28904)
Fix issue with alias names clashing in `keytool -import` command, when
there's more than one cert file in the `ca-certs` folder.

The fix is to explicitly set the alias for each `keytool -import` run,
to the file itself, so clashes don't happen.
2023-11-16 19:19:04 +05:30
Shrikant Sharat Kandula
2774f97d57
feat: Support running as a non-root user (#28290)
Running an Appsmith as a non-root user:

```sh
docker run --name appsmith --user 70:70
```

The `70:70` figures are the UID and GID respectively. It can mostly be
any number, safe to user figures are 70 to 79, or anything above 200 and
below 65000. The important bit, is that it shouldn't change on restart
or manual updates etc.

No product functionality should be affected when running as a non-root
user.
2023-11-15 11:28:25 +05:30
Shrikant Sharat Kandula
1719d73ab6
fix: Fail startup when supervisor creds are missing 2023-10-18 07:58:56 +05:30
Shrikant Sharat Kandula
b414d0746b fix: Remove explicit stats directory for embedded Postgres 2023-10-17 15:00:12 +05:30
Shrikant Sharat Kandula
afd03a526d
chore: Update embedded MongoDB Schema version (#27985) 2023-10-17 06:28:45 +05:30
Shrikant Sharat Kandula
8ea3884632
chore: Support auto-SSL when running behind a forward proxy 2023-10-07 14:21:00 +05:30
Shrikant Sharat Kandula
53bcdafe91
fix: Get Java from GitHub release artifacts directly (#27862)
What are we solving here?

1. Installing Java in the `Dockerfile` by using Adoptium's package
repositories is fragile since they've started blocking some IP addresses
used by GitHub Actions runners. We see a message like this:
   ```
Failed to fetch
https://packages.adoptium.net/artifactory/deb/pool/main/t/temurin-17/temurin-17-jdk_17.0.8.1.0+1_amd64.deb
403 Forbidden [IP: 146.75.107.42 443]
   ```
We're seeing more and more cases of these and PRs are getting blocked.

2. Installing Java via `apt` also installs other packages like X11
libraries, that aren't really relevant to our usage of Java. Yet, these
packages are present in our Docker image, and are the source of several
CVEs to be reported by scanners on our Docker image.

3. This will give us control over trusted CA certificates, which we can
now perform under `$TMP`, which aligns with our move towards supporting
readonly root filesystem. Which is essentially not write to anything in
the Docker image at runtime, except for under `/tmp` and
`/appsmith-stacks`. This will help us move in that direction.
2023-10-06 19:38:19 +05:30
Shrikant Sharat Kandula
63322193d2
chore: Remove build-essential by default in the Docker image (#27813)
This removes ~70 medium/low severity CVEs reported on our Docker image,
by removing `build-essential` from being installed by default in the
Docker image.

We only need it when compiling Redis, which is needed on _some_ ARM
systems, that re configured with a page-size of greater than 4096. For
example, CentOS 8.
2023-10-05 10:26:39 +05:30
Shrikant Sharat Kandula
2f5405d86d
chore: Run NGINX with readonly root FS support (#27453)
Part of supporting readonly root filesystem, gets NGINX to start without
doing any writes to the filesystem, except for in `/tmp`.
2023-09-27 13:38:47 +05:30
Sumesh Pradhan
9964be125a
fix: Use temporary directory for embedded postgres stats data (#27455)
Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2023-09-27 11:35:43 +05:30
Sumesh Pradhan
8e0d3544c9
feat: password updation for supervisor basic auth native (#27267) 2023-09-20 15:52:35 +05:30
Shrikant Sharat Kandula
0e4cd23c0e
fix: Fix escaping for _multiple_ single quotes in env variables (#27368)
[Slack
Conversation](https://theappsmith.slack.com/archives/C0341RERY4R/p1694794275962369).
2023-09-19 09:33:14 +05:30
Shrikant Sharat Kandula
ab5cc22a6d
chore: Readonly root FS for supervisord configuration (#27171)
This is part of supporting running Appsmith with readonly root FS. This
moves the supervisord configuration, and runtime files, like the unix
socket file, and the PID file, to `$TMP`.
2023-09-14 14:43:06 +05:30
Shrikant Sharat Kandula
55dea43b2d
chore: Place local MongoDB cluster key in /tmp instead of / (#26963)
This is another step towards supporting running with readonly root FS,
and only making runtime changes in the container in `/tmp` or in
`/appsmith-stacks`, and nowhere else.
2023-09-11 12:54:50 +05:30
Shrikant Sharat Kandula
c594699eac
chore: Use single COPY command in Dockerfile for constant/static files (#27127)
Move the files that are copied into the Docker image, into an `fs`
folder, that reflects the folder structure of that in the image. This
means two things right away:

1. A single `COPY` instruction in `Dockerfile` is enough to copy all the
files to their places.
2. The structure of files in the repo reflects that in the Docker image.
This makes working with the files/folders and troubleshooting with them
much easier.

 Note: **There's actually only 3 files changed, rest are just moved.**
2023-09-11 08:43:09 +05:30