Commit Graph

342 Commits

Author SHA1 Message Date
Sumesh Pradhan
1e33a6c5dc
fix: Embedded postgres file owner fix (#24601)
Fixes https://github.com/appsmithorg/appsmith/issues/24358 where
postgres system files owner is updated with mongodb user on updating
Appsmith.

Tested manually by updating v1.9.22 to nightly.
2023-06-19 15:28:47 +05:30
Goutham Pratapa
fe8ef07021
create stackpath in cloudrun based deployment (#24457)
This will complete:
[23522](https://github.com/appsmithorg/appsmith/issues/23522)
Currently, when we deploy appsmith on cloudrun we see this error. This
commit will fix this issue
```
2023-06-14 12:32:10.513 IST
Mounting File Sytem
2023-06-14 12:32:10.521 IST
mount.nfs: mount point /appsmith-stacks does not exist
2023-06-14 12:32:10.533 IST
Container called exit(32).
```
2023-06-14 15:10:41 +05:30
Goutham Pratapa
a25e02b621
chore: update entrypoint to deploy appsmith on cloudrun (#23829)
Fixes: [23522](https://github.com/appsmithorg/appsmith/issues/23522)

---------

Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2023-06-09 10:24:43 +05:30
Goutham Pratapa
1c0d1f7cb8
chore: fix ipv6 nginx startup error (#24199)
Fixes: [24013](https://github.com/appsmithorg/appsmith/issues/24013)
The issue started with the introduction of adding of startup-events.
Because of the ipv6 header
```

server {
	listen 80 default_server;
        listen [::]:80 default_server;
}

```
 present in the 
`/etc/nginx/sites-enabled/default` and calling nginx

[here](https://github.com/appsmithorg/appsmith/blob/release/deploy/docker/entrypoint.sh#L392).

With this change we are removing ```listen [::]:80 default_server;```
from the file before starting nginx.

<img src="https://front.com/assets/img/favicons/favicon-32x32.png"
height="16" width="16" alt="Front logo" /> [Front
conversations](https://app.frontapp.com/open/top_b69u4)
2023-06-09 07:27:58 +05:30
Goutham Pratapa
20ddfa9124
Revert "fix: ipv6 nginx startup error (#24041)" (#24197) 2023-06-07 15:50:55 +05:30
Goutham Pratapa
9cec0c9299
fix: ipv6 nginx startup error (#24041)
Fixes: [24013](https://github.com/appsmithorg/appsmith/issues/24013)
The issue started with the introduction of adding of startup-events.
Because of the ipv6 header
```

server {
	listen 80 default_server;
        listen [::]:80 default_server;
}

```
 present in the 
`/etc/nginx/sites-enabled/default` and calling nginx
[here](https://github.com/appsmithorg/appsmith/blob/release/deploy/docker/entrypoint.sh#L392).

With this change we are removing ```listen [::]:80 default_server;```
from the file before starting nginx.

---------

Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2023-06-07 14:14:22 +05:30
Sumesh Pradhan
a359444556
fix: improve starting page removal script with error handling (#23392)
- Removed event listener python script, removed supervisor conf for the
same.
- Added new python script to handle the starting page init.
- Python script will be called via a shell script with a failsafe
removal of the loading page.
- The above shell script will be run as a child of the run java script

Tests:
The child script exits after execution, and does not create zombie
process even when the run java script is called multiple times with
restarts.
Verified exceptions and failsafe manually by introducing syntax errors
and uninstalling requests module.

---------

Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2023-06-06 18:32:40 +05:30
Sumesh Pradhan
198c0ff1b0
feat: Perf disable Nginx access logs for static resources (#23834)
- Disable Nginx access logs for static resource requests
2023-06-06 13:51:26 +05:30
Ankita Kinger
7a38c52d83
chore: Merge conflict resolution with master (#24063)
## Description
> Add a TL;DR when description is extra long (helps content team)
>
> Please include a summary of the changes and which issue has been
fixed. Please also include relevant motivation
> and context. List any dependencies that are required for this change
>
> Links to Notion, Figma or any other documents that might be relevant
to the PR
>
>
#### PR fixes following issue(s)
Fixes # (issue number)
> if no issue exists, please create an issue and ask the maintainers
about this first
>
>
#### Media
> A video or a GIF is preferred. when using Loom, don’t embed because it
looks like it’s a GIF. instead, just link to the video
>
>
#### Type of change
> Please delete options that are not relevant.
- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- Chore (housekeeping or task changes that don't impact user perception)
- This change requires a documentation update
>
>
>
## Testing
>
#### How Has This Been Tested?
> Please describe the tests that you ran to verify your changes. Also
list any relevant details for your test configuration.
> Delete anything that is not relevant
- [ ] Manual
- [ ] Jest
- [ ] Cypress
>
>
#### Test Plan
> Add Testsmith test cases links that relate to this PR
>
>
#### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking
(copy link from comments dropped on this PR)
>
>
>
## Checklist:
#### Dev activity
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


#### QA activity:
- [ ] [Speedbreak
features](https://github.com/appsmithorg/TestSmith/wiki/Test-plan-implementation#speedbreaker-features-to-consider-for-every-change)
have been covered
- [ ] Test plan covers all impacted features and [areas of
interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans/_edit#areas-of-interest)
- [ ] Test plan has been peer reviewed by project stakeholders and other
QA members
- [ ] Manually tested functionality on DP
- [ ] We had an implementation alignment call with stakeholders post QA
Round 2
- [ ] Cypress test cases have been added and approved by SDET/manual QA
- [ ] Added `Test Plan Approved` label after Cypress tests were reviewed
- [ ] Added `Test Plan Approved` label after JUnit tests were reviewed

---------

Co-authored-by: Trisha Anand <trisha@appsmith.com>
Co-authored-by: Nidhi <nidhi@appsmith.com>
Co-authored-by: Arpit Mohan <mohanarpit@users.noreply.github.com>
Co-authored-by: Sumit Kumar <sumit@appsmith.com>
Co-authored-by: ChandanBalajiBP <104058110+ChandanBalajiBP@users.noreply.github.com>
Co-authored-by: Aishwarya-U-R <91450662+Aishwarya-U-R@users.noreply.github.com>
Co-authored-by: balajisoundar <balaji@appsmith.com>
Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
Co-authored-by: sidhantgoel <sidhant@hexcod.in>
Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
Co-authored-by: Satish Gandham <satish.iitg@gmail.com>
Co-authored-by: Nilesh Sarupriya <nilesh@appsmith.com>
Co-authored-by: Nilesh Sarupriya <20905988+nsarupr@users.noreply.github.com>
Co-authored-by: nilansh <nilansh@appsmith.com>
Co-authored-by: Ayangade Adeoluwa <37867493+Irongade@users.noreply.github.com>
Co-authored-by: akash-codemonk <67054171+akash-codemonk@users.noreply.github.com>
Co-authored-by: Vijetha-Kaja <119562824+Vijetha-Kaja@users.noreply.github.com>
Co-authored-by: Manish Kumar <107841575+sondermanish@users.noreply.github.com>
Co-authored-by: Sumesh Pradhan <sumesh@appsmith.com>
Co-authored-by: Rishabh Rathod <rishabh.rathod@appsmith.com>
Co-authored-by: Shrikant Sharat Kandula <shrikantsharat.k@gmail.com>
Co-authored-by: Tanvi Bhakta <tanvi@appsmith.com>
Co-authored-by: Somangshu Goswami <somangshu.goswami1508@gmail.com>
Co-authored-by: Tolulope Adetula <31691737+Tooluloope@users.noreply.github.com>
Co-authored-by: Anagh Hegde <anagh@appsmith.com>
Co-authored-by: Saroj <43822041+sarojsarab@users.noreply.github.com>
Co-authored-by: Nayan <nayan@appsmith.com>
Co-authored-by: Arsalan <arsalanyaldram0211@outlook.com>
Co-authored-by: ashit-rath <ashit@appsmith.com>
Co-authored-by: Rimil Dey <rimil@appsmith.com>
Co-authored-by: Druthi Polisetty <druthi@appsmith.com>
Co-authored-by: Sangeeth Sivan <74818788+berzerkeer@users.noreply.github.com>
Co-authored-by: subratadeypappu <subrata@appsmith.com>
Co-authored-by: Ayush Pahwa <ayush@appsmith.com>
Co-authored-by: Rajat Agrawal <rajat@appsmith.com>
Co-authored-by: Pawan Kumar <pawan.stardust@gmail.com>
Co-authored-by: Abhijeet <41686026+abhvsn@users.noreply.github.com>
Co-authored-by: Aman Agarwal <aman@appsmith.com>
Co-authored-by: Parthvi Goswami <parthvigoswami@Parthvis-MacBook-Pro.local>
Co-authored-by: Anand Srinivasan <66776129+eco-monk@users.noreply.github.com>
Co-authored-by: Anand Srinivasan <anand.a.srinivasan@outlook.com>
Co-authored-by: Satish Gandham <hello@satishgandham.com>
Co-authored-by: Goutham Pratapa <goutham@appsmith.com>
Co-authored-by: manish kumar <manish@appsmith.com>
Co-authored-by: Dipyaman Biswas <dipyaman@appsmith.com>
Co-authored-by: Ayush Pahwa <ayushpahwa96@gmail.com>
Co-authored-by: Rohit Agarwal <rohit_agarwal@live.in>
Co-authored-by: Tanvi Bhakta <tanvibhakta@gmail.com>
Co-authored-by: Ankit Srivastava <67647761+ankitsrivas14@users.noreply.github.com>
Co-authored-by: tkAppsmith <131347120+tkAppsmith@users.noreply.github.com>
2023-06-06 11:40:27 +05:30
Shrikant Sharat Kandula
a08b525007
fix: Re-gzip html files after env variables substitution (#23546)
We replace env variables in `index.html`, `view.html` and `edit.html`,
just before start NGINX. But the `.gz` versions of these files don't
have these changes applied to them. This PR gzips those HTML files
again, after the substitutions are applied.

From
https://github.com/appsmithorg/appsmith/pull/23539#issuecomment-1554509537.
2023-05-31 15:27:12 +05:30
Shrikant Sharat Kandula
f4c6db732c
fix: Apply env replacements to view.html and edit.html (#23539) 2023-05-19 18:15:49 +05:30
Sumesh Pradhan
6b55e888d9
feat: Auto cleanup application logs (#23084)
- Added cron task to cleanup log files older than 7 days to run weekly.
- Updated supervisor log rotation config to store only 2 backups for all
processes.
2023-05-11 20:10:37 +05:30
Satish Gandham
83538ad74d
feat: Bundle optimization and first load improvements (#21667)
Co-authored-by: Ivan Akulov <mail@iamakulov.com>
Co-authored-by: Satish Gandham <hello@satishgandham.com>
Co-authored-by: Ivan Akulov <iamakulov@outlook.com>
Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
Co-authored-by: somangshu <somangshu.goswami1508@gmail.com>
2023-05-11 10:56:03 +05:30
Abhijeet
467dc1d55b
fix: Email domain hash in analytics event (#23114)
## Description
We are solving 2 problems with this PR:
1. For `Installation Setup Complete` event email domain hash was
incorrect and earlier we were hashing the instanceId which means if user
with same email tries to run 2 different instances hash was different.
2. `IP` is a reserved keyword for tracking events in Mixpanel though
this is allowed in Segment. Instead of showing the ip as is, Mixpanel
provides derived property. As we want derived props alongwith the ip
address we are sharing the IP address in separate keys.
Ref:
https://help.mixpanel.com/hc/en-us/articles/360001355266-Event-Properties

#### PR fixes following issue(s)
Fixes https://github.com/appsmithorg/cloud-services/issues/675

#### Type of change
- Bug fix (non-breaking change which fixes an issue)

#### How Has This Been Tested?
- [x] Manual

## Checklist:
#### Dev activity
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


#### QA activity:
- [ ] [Speedbreak
features](https://github.com/appsmithorg/TestSmith/wiki/Test-plan-implementation#speedbreaker-features-to-consider-for-every-change)
have been covered
- [ ] Test plan covers all impacted features and [areas of
interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans/_edit#areas-of-interest)
- [ ] Test plan has been peer reviewed by project stakeholders and other
QA members
- [ ] Manually tested functionality on DP
- [ ] We had an implementation alignment call with stakeholders post QA
Round 2
- [ ] Cypress test cases have been added and approved by SDET/manual QA
- [ ] Added `Test Plan Approved` label after Cypress tests were reviewed
- [ ] Added `Test Plan Approved` label after JUnit tests were reviewed
2023-05-10 17:20:11 +05:30
Shrikant Sharat Kandula
ad5d829d13
fix: Don't log all env variables when starting up (#22864)
Because tracing is turned on in the `entrypoint.sh`, everything we
source also log all names and values, including the `docker.env` file.
This means all env values are printed to the logs.

This PR disables the tracing to fix this. It was enabled originally for
improved logging information for some of the issues we were facing at
the time, but if we still need such logging information, we need to log
those explicitly with `echo`, instead of using `xtrace`.
2023-05-01 14:16:09 +05:30
Sumesh Pradhan
2cfcae3fe4
fix: Supervisord event listener health check exception Handling (#22587)
Event Listener Python script fixes:
- Added exception handling in health check request
- Updated backend health check point to
`http://localhost:8080/api/vi/health`
2023-04-21 18:06:35 +05:30
Sumesh Pradhan
f1bf7b17dc
feat: Display loading message in browser when Appsmith is starting (#22215)
## Description
Added Appsmith Initializing and Starting pages to inform the users that
Appsmith is starting up and they will need to wait for a few minutes
before their Appsmith deployment is up and running, instead of
displaying the 503 error like it earlier.


## Type of change
- New feature (non-breaking change which adds functionality)

# Media
Initialization page

![image](https://user-images.githubusercontent.com/20785806/230869925-a342e327-c714-4cfa-8283-cf6f5bd225b5.png)

Starting page

![image](https://user-images.githubusercontent.com/20785806/230869770-67654c0a-e4de-4d18-83dd-9f68230648e9.png)

[Demo
Video](https://drive.google.com/file/d/1sjvfbtbWHRqVfg0Vvf2JM6W3y61-KrWm/view?usp=share_link)
## How Has This Been Tested?
- Manual

---------

Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
Co-authored-by: Arpit Mohan <mohanarpit@users.noreply.github.com>
2023-04-19 18:20:59 +05:30
Shrikant Sharat Kandula
97a2338d4b
chore: Add Cache-Control header for static assets (#22175)
Fix https://github.com/appsmithorg/appsmith/issues/10503

Continuing discussion from
https://github.com/appsmithorg/appsmith/pull/21951.
2023-04-19 06:42:01 +05:30
Sumesh Pradhan
2af62a8dfe
fix: appsmithctl restore overwrites the MONGODB URI (#22229)
**Fixes:**
  - Overwriting MongoDB env data on appsmithctl restore.
  - appsmithctl backup does not include the MongoDB env vars.

**Features:** 
- appsmithctl backup now does not stop backend and rts service during
backup operation.
  _Note:-
It will be the responsibility of the Admin to make sure that a manual
backup is really a desired snapshot when done via
  the appsmithctl backup util command
To ensure this, Admins may require to stop the backend and rts processes
in the container before a manual backup( We will need to document this)
[ In future we can add an appsmithctl cmd to put appsmith to maintenance
mode with a maintenance page ]_

Fixes # [21603](https://github.com/appsmithorg/appsmith/issues/21603)
2023-04-18 06:52:36 +05:30
Shrikant Sharat Kandula
9ae13042a2
Revert "chore: Add Cache-Control header for static assets" (#22174)
Reverts appsmithorg/appsmith#21951

Merged by accident.
2023-04-07 12:40:17 +05:30
Shrikant Sharat Kandula
7b6a46d08d
chore: Add Cache-Control header for static assets (#21951)
Fix #10503
2023-04-07 12:39:35 +05:30
Shrikant Sharat Kandula
40adc1dd8f
chore: Check for AVX instruction earlier than the first mongod run (#21621)
We're already checking for the AVX instruction, and producing a helpful
message about it. But, we're doing that check _after_ we invoke the
`mongod` process, which fails on such processes, and the error message
is never shown.

This PR changes this, by doing the check before that `mongod` command is
run.
2023-03-30 06:00:35 +05:30
Shrikant Sharat Kandula
6d65f4a7f1
chore: Add "Installation Started" event (#21620) 2023-03-21 13:58:18 +05:30
Shrikant Sharat Kandula
ea16f40f0c
fix: Fix command interpolation error in replicaSet check (#21469)
If the replicaSet check fails, we see the following error:

```
readWrite command not found
```

This is because of using the command interpolation backticks in the
double-quoted string.
2023-03-20 13:18:52 +05:30
Shrikant Sharat Kandula
43656a3714
fix: Revert container-internal communication when using IPv6 (#21260)
This reverts commit b3dbd85dbe.

This causes NGINX to fail to start if IPv6 is not available on the
system.
2023-03-08 21:03:46 +05:30
Sumesh Pradhan
c3c6218c0f
feat: Embeded PostgreSQL with mockdb data for self-hosted (#21084)
## Description
This PR includes changes for self-hosted instances to utilize an
embedded postgres database for the Template's mockdb.
After this change, by default Appsmith will always run the embedded
Postgres, and connect to it instead of the mockdb cloud instance.

**Solves:**
Issue[#20107](https://github.com/appsmithorg/appsmith/issues/20107)

**Changes:**
- [x] Install Postgresql in the Docker container using Dockerfile :-
_Updated Docker file to install PostgreSQL v13_

- [x] Add provision to stop/disable Postgresql from booting based on an
environment variable :- _To disable embedded postgres, set the **ENV**
var `APPSMITH_ENABLE_EMBEDDED_DB` to `0`; Configured supervisord to
control the lifecycle of the postgres server ( Supervisor uses user
postgres to start the server since root is not allowed)_

- [x] Seed data into the Postgresql DB during first container startup.
This ensures that we don't have to ship the Docker
container with data & bloat it unnecessarily. :- _Curretly, the SQL dump
is baked into the image._
      
- [x] Persist the Postgresql data in /appsmith-stacks. This ensures that
the data is persisted across version upgrades. :- _The postgres uses the
file system at` /stacks/data/postgres/main` ; note: The file system
owner is user/group postgres_

- [x] Update the mock db endpoint in the product to use the local DB by
default instead of the hosted DB for self-hosted instances. The cloud
instance should still use the hosted DB :- _The embedded postgres
authentication is set to the type `trust`, allowing the existing
template mockdb meta data to be used without any update to the existing
templates mockdb endpoint and credentials_

**Note: There is an additional table `mydb` added to the mockdb for
quickly verifying the db source is the embedded postgres, since the
cloud mockdb does not have that table.**

---------

Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2023-03-07 15:22:41 +05:30
Shrikant Sharat Kandula
b3dbd85dbe
fix: Fix container-internal communication when using IPv6 (#20981)
When services within the fat container try to communicate with each
other, like backend to RTS etc., if they use the loopback address of
IPv4, `127.0.0.1`, it works. But if they use the loopback address of
IPv6, `::1`, it fails because the NGINX inside the fat container isn't
set to bind to IPv6.

This PR fixes this.

In EE, we attempt to make connections to Keycloak without setting the
hostname on the `WebClient`. This picks up the hostname of `::1` on
systems with IPv6 as default, and so the communication between backend
and Keycloak fails.

This is affecting users on ECS Fargate, for example.
2023-02-27 19:51:54 +05:30
Shrikant Sharat Kandula
5e35c1fdae
feat: Support for proxy authentication (#20929)
Appsmith supports running with a HTTP proxy, that can be configured with
`HTTP_PROXY` or `HTTPS_PROXY` env variables. Like this:

```sh
HTTP_PROXY=http://myproxy:8080
HTTPS_PROXY=http://myproxy:8443
```

However, this proxy support didn't support authentication. This PR
implements that. Now, proxy with authentication can be configured like
this:

```sh
HTTP_PROXY=http://user:password@myproxy:8080
HTTPS_PROXY=http://user:password@myproxy:8080
```

This is not syntax or standards invented by Appsmith. This is the
standard way proxy is usually configured.

Fixes #16330

🍰
2023-02-24 14:53:08 +05:30
Sumesh Pradhan
2b55ec50fb
fix: update mongo cmd in evalMongo to use mongosh (#20780)
The cmd util appsmithctl now used `mongosh` instead of the legacy
`mongo` shell.
2023-02-24 12:19:19 +05:30
Nidhi
412179d1fc
fix: Increased Nginx limit to 150 MB to allow 100 MB Base 64 encoded files (#20617)
## Description

We're increasing the default limit of request payload on cloud so that
100 MB files that are base 64 encoded can also be uploaded via Appsmith.

Fixes #20424

## Type of change
- Bug fix (non-breaking change which fixes an issue)

## How Has This Been Tested?
- Manual

### Test Plan
> Add Testsmith test cases links that relate to this PR

### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking
(copy link from comments dropped on this PR)


## Checklist:
### Dev activity
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test
2023-02-20 20:34:02 +05:30
Shrikant Sharat Kandula
325fcce49f
fix: Check for AVX instruction, and produce a warning (#20463)
When running on CPUs without an AVX instruction, the embedded MongoDB
cannot run. It fails to run with a cryptic error message, and they are
forced to reach out to support for help.

This PR adds a check, and a warning message, if trying to use embedded
MongoDB on a CPU without the AVX instruction.
2023-02-18 06:53:33 +05:30
Sumesh Pradhan
a846bd4952
fix: renamed rts port env to APPSMITH_RTS_PORT (#20121)
Issue: Nginx and RTS used the same env PORT for binding it's service,
while the backend server had the rts port hardcoded on its rts uri.
- Renamed env PORT to APPSMITH_RTS_PORT for starting the rts server.
- Updated nginx config templates to use env `APPSMITH_RTS_PORT`
- Added appsmith.rts.port property in server to use env
APPSMITH_RTS_PORT
- Updated CommonConfig.java rtsBaseDomain to use appsmith.rts.port

---------

Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2023-02-15 07:06:02 +05:30
Shrikant Sharat Kandula
4b6c8568ad
fix: NO_PROXY not set correctly on backend server (#20605)
When we have `NO_PROXY=localhost,one.com,two.com,three.com`, then the
current implementation will pass the following to the backend server:

```
localhost|one.com,two.com,three.com
```

This will mean that only `localhost` will bypass the proxy, which is not
what's expected.

This PR fixes this problem, so that the following is sent to the backend
server:

```
localhost|one.com|two.com|three.com
```

This will mean that requests to all four of them, will bypass the proxy,
as expected.
2023-02-14 19:13:19 +05:30
Shrikant Sharat Kandula
87cffb6a05
fix: Fix replicaset check to not require ClusterMonitor role (#19997)
In the `entrypoint.sh` script, we check if the MongoDB in use, has
replicaSet initiated or not. This is usually done with a `rs.initiate()`
on the cluster.

We need the replicaSet to be enabled on MongoDB, since the backend
server relies on MongoDB `changeStream`s, which is a feature, only
available if replicaSet is enabled.

However, to use the `changeStream` APIs, having the `read` or
`readWrite` role on MongoDB is enough. But the check we do in
`entrypoint.sh`, runs `rs.status()` to see if `replicaSet` is initiated.
This `rs.status()` call, unfortunately, requires the `ClusterMonitor`
role, unlike the `changeStream` API.

To tackle this, we created the `appsmithctl check_replica_set` command.
This command would attempt to use the `changeStream` API, and report
success or failure. But this failed on certain configurations, where
MongoDB was running as a single-node-cluster, on localhost, or a
local/internal network. This was an edge case.

That edge case is solved by this PR. With this, we can use `appsmithctl
check-replica-set` in the `entrypoint.sh` again.
2023-02-07 05:38:37 +05:30
Shrikant Sharat Kandula
3be0d76206
fix: Change watchtower to latest (#20001)
We're `watchtower:latest-dev` image for the `--schedule` support. This
was only available in the `latest-dev` version of Watchtower.

Now, this feature is available in the `latest` version of Watchtower, so
we should be fine switching back to `latest`.

More importantly, the `latest-dev` version of Watchtower, doesn't have
ARM images built. It only has AMD images built today. So this watchtower
service fails to start on ARM architectures. This PR fixes that.
2023-02-02 06:27:35 +05:30
Shrikant Sharat Kandula
f65986c351
fix: Use mongosh instead of mongo in entrypoint (#20055)
Fixes #19969.

The previous PR that fixed this was failing with the way we were
creating the initial user on MongoDB. This PR addresses that.

Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
2023-01-27 16:05:00 +05:30
Shrikant Sharat Kandula
62db0a5c07 Revert "fix: Switched Mongo client to mongosh in Docker entrypoint script to support CPUs without AVX (#19971)"
This reverts commit bf86a693a1.
2023-01-25 05:40:35 +05:30
Jari Maijenburg
bf86a693a1
fix: Switched Mongo client to mongosh in Docker entrypoint script to support CPUs without AVX (#19971)
## Description

The Appsmith Docker image was unable to run on CPUs without AVX
instructions because the entrypoint script was using the legacy `mongo`
client. This PR replaces the `mongo` client with the new `mongosh`
client in the entrypoint, which does not require these instructions. Wit
this fix, the Appsmith Docker image is able to run on CPUs without AVX
instructions.

Fixes #19969

## Type of change
- Bug fix (non-breaking change which fixes an issue)

## How Has This Been Tested?
- Manual

## Checklist:
### Dev activity
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test
2023-01-24 07:36:44 +05:30
Sumesh Pradhan
ab5fd20a76
fix: Redis rdb persistance | User session persistance (#19981)
## Description
- Updated redis.conf to set the Redis rdb directory to
`/appsmith-stacks/data/redis` bind-mount directory, so that the data is
persisted after the container restarts/updates. ( This was causing user
sessions on Appsmith installations using the embedded Redis to reset
after every container restart, since the redis data was not being
persisted)
- Updated redis.conf for the embedded Redis to increase the snapshot
frequency to dump after every 15 sec if at least 1 key changed

Fixes #19768

## Type of change
- Bug fix (non-breaking change which fixes an issue)


## How Has This Been Tested?
- Manual
2023-01-23 17:50:37 +05:30
dependabot[bot]
57b885c8b8
chore: bump luxon from 3.0.1 to 3.2.1 in /deploy/docker/utils (#19587)
Bumps [luxon](https://github.com/moment/luxon) from 3.0.1 to 3.2.1.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/moment/luxon/blob/master/CHANGELOG.md">luxon's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<h1>3.2.0 (2022-12-29)</h1>
<ul>
<li>Allow timeZone to be specified as an intl option</li>
<li>Fix for diff's handling of end-of-month when crossing leap years (<a
href="https://github-redirect.dependabot.com/moment/luxon/issues/1340">#1340</a>)</li>
<li>Add Interval.toLocaleString() (<a
href="https://github-redirect.dependabot.com/moment/luxon/issues/1320">#1320</a>)</li>
</ul>
<h1>3.1.1 (2022-11-28)</h1>
<ul>
<li>Add Settings.twoDigitCutoffYear</li>
</ul>
<h1>3.1.0 (2022-10-31)</h1>
<ul>
<li>Add Duration.rescale</li>
</ul>
<h1>3.0.4 (2022-09-24)</h1>
<ul>
<li>Fix quarters in diffs (<a
href="https://github-redirect.dependabot.com/moment/luxon/issues/1279">#1279</a>)</li>
<li>Export package.json in package (<a
href="https://github-redirect.dependabot.com/moment/luxon/issues/1239">#1239</a>)</li>
</ul>
<h1>3.0.2 (2022-08-28)</h1>
<ul>
<li>Lots of doc changes</li>
<li>Added DateTime.expandFormat</li>
<li>Added support for custom conversion matrices in Durations</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="b1fee58b87"><code>b1fee58</code></a>
bump to 3.2.1</li>
<li><a
href="5ab3bf64a1"><code>5ab3bf6</code></a>
fix rfc2822 regex</li>
<li><a
href="806467adac"><code>806467a</code></a>
preserve language tags (<a
href="https://github-redirect.dependabot.com/moment/luxon/issues/1354">#1354</a>)</li>
<li><a
href="acc4952585"><code>acc4952</code></a>
bump dev dependencies</li>
<li><a
href="c8f7191574"><code>c8f7191</code></a>
bump to 3.2.0</li>
<li><a
href="f9917c4a65"><code>f9917c4</code></a>
clarify equality docstring</li>
<li><a
href="a6f27370ad"><code>a6f2737</code></a>
allow timeZone to be specified as an intl option</li>
<li><a
href="f8285c74f3"><code>f8285c7</code></a>
find diff by duration hash instead of using repeated addition to cursor
(<a
href="https://github-redirect.dependabot.com/moment/luxon/issues/1340">#1340</a>)</li>
<li><a
href="d607d8fbf2"><code>d607d8f</code></a>
remove extra param from tokenForPart</li>
<li><a
href="7e5d24dcab"><code>7e5d24d</code></a>
Add Interval.toLocaleString() (<a
href="https://github-redirect.dependabot.com/moment/luxon/issues/1320">#1320</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/moment/luxon/compare/3.0.1...3.2.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=luxon&package-manager=npm_and_yarn&previous-version=3.0.1&new-version=3.2.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the
default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as
the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as
the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the
default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/appsmithorg/appsmith/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-13 14:02:32 +05:30
Sumesh Pradhan
a1be1bf941
feat: appsmithctl version and mongo-eval utils (#19075)
`appsmithctl version` - Util to display current Appsmith version
`appsmithctl mongo-eval '<mongo query>' [--pretty]` - Util to run mongo
queries

Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2023-01-03 12:14:21 +05:30
Nidhi
dfccd5a058
chore: Upgrade to Spring Boot 3.0.1 (#19044)
This upgrade takes care of our move to JDK 17, Spring Boot 3.0.1 and a
few other security upgrades along the way.

Fixes #18993 

TODO:

- [x] Check CI changes for Java 17
- [x] Check vulnerability report
- [x] Mongock needs an upgrade
- [x] Add JVM args at all possible places for exposing java.time module
- [x] Add type adapters everywhere / use the same config for type
adapters everywhere
2023-01-02 19:40:59 +07:00
dependabot[bot]
02a6b0cf79
chore: bump json5 from 2.2.1 to 2.2.3 in /deploy/docker/utils (#19430)
Bumps [json5](https://github.com/json5/json5) from 2.2.1 to 2.2.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/json5/json5/releases">json5's releases</a>.</em></p>
<blockquote>
<h2>v2.2.3</h2>
<ul>
<li>Fix: json5@2.2.3 is now the 'latest' release according to npm instead of v1.0.2. (<a href="https://github-redirect.dependabot.com/json5/json5/issues/299">#299</a>)</li>
</ul>
<h2>v2.2.2</h2>
<ul>
<li>Fix: Properties with the name <code>__proto__</code> are added to objects and arrays.
(<a href="https://github-redirect.dependabot.com/json5/json5/issues/199">#199</a>) This also fixes a prototype pollution vulnerability reported by
Jonathan Gregson! (<a href="https://github-redirect.dependabot.com/json5/json5/issues/295">#295</a>).</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/json5/json5/blob/main/CHANGELOG.md">json5's changelog</a>.</em></p>
<blockquote>
<h3>v2.2.3 [<a href="https://github.com/json5/json5/tree/v2.2.3">code</a>, <a href="https://github.com/json5/json5/compare/v2.2.2...v2.2.3">diff</a>]</h3>
<ul>
<li>Fix: json5@2.2.3 is now the 'latest' release according to npm instead of
v1.0.2. (<a href="https://github-redirect.dependabot.com/json5/json5/issues/299">#299</a>)</li>
</ul>
<h3>v2.2.2 [<a href="https://github.com/json5/json5/tree/v2.2.2">code</a>, <a href="https://github.com/json5/json5/compare/v2.2.1...v2.2.2">diff</a>]</h3>
<ul>
<li>Fix: Properties with the name <code>__proto__</code> are added to objects and arrays.
(<a href="https://github-redirect.dependabot.com/json5/json5/issues/199">#199</a>) This also fixes a prototype pollution vulnerability reported by
Jonathan Gregson! (<a href="https://github-redirect.dependabot.com/json5/json5/issues/295">#295</a>).</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="c3a7524277"><code>c3a7524</code></a> 2.2.3</li>
<li><a href="94fd06d82e"><code>94fd06d</code></a> docs: update CHANGELOG for v2.2.3</li>
<li><a href="3b8cebf0c4"><code>3b8cebf</code></a> docs(security): use GitHub security advisories</li>
<li><a href="f0fd9e194d"><code>f0fd9e1</code></a> docs: publish a security policy</li>
<li><a href="6a91a05fff"><code>6a91a05</code></a> docs(template): bug -&gt; bug report</li>
<li><a href="14f8cb186e"><code>14f8cb1</code></a> 2.2.2</li>
<li><a href="10cc7ca916"><code>10cc7ca</code></a> docs: update CHANGELOG for v2.2.2</li>
<li><a href="7774c10979"><code>7774c10</code></a> fix: add <strong>proto</strong> to objects and arrays</li>
<li><a href="edde30abd8"><code>edde30a</code></a> Readme: slight tweak to intro</li>
<li><a href="97286f8bd5"><code>97286f8</code></a> Improve example in readme</li>
<li>Additional commits viewable in <a href="https://github.com/json5/json5/compare/v2.2.1...v2.2.3">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=json5&package-manager=npm_and_yarn&previous-version=2.2.1&new-version=2.2.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/appsmithorg/appsmith/network/alerts).

</details>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-02 18:08:35 +05:30
Goutham Pratapa
349ed41e49
chore: refactor backend startup script (#19420)
Fixes: [19300](https://github.com/appsmithorg/appsmith/issues/19300)
2023-01-02 15:25:23 +05:30
Goutham Pratapa
1de045d9d8
chore: Add dependency to start backend only if rts is ready (#19218)
Fixes: [19207](https://github.com/appsmithorg/appsmith/issues/19207)

**By default on start-up**

```
root@ab348246fff8:/appsmith-stacks/logs# head backend/backend-ab348246fff8.log
Waiting for RTS to start ...
RTS started.
Starting Backend server...
Load environment configuration
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/appsmith/backend/server.jar!/BOOT-INF/lib/logback-classic-1.2.11.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/appsmith/backend/server.jar!/BOOT-INF/lib/slf4j-reload4j-1.7.36.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
[2022-12-26 11:39:34,962]  - Starting ServerApplication vv1.8.14.1 using Java 11.0.17 on ab348246fff8 with PID 1543 (/opt/appsmith/backend/server.jar started by root in /opt/appsmith/backend)
```
**Upon stopping RTS manually** 

```
root@ab348246fff8:/appsmith-stacks/logs# supervisorctl stop rts
rts: stopped
root@ab348246fff8:/appsmith-stacks/logs# supervisorctl status
backend                          RUNNING   pid 1497, uptime 0:01:21
cron                             RUNNING   pid 1505, uptime 0:01:21
editor                           RUNNING   pid 1502, uptime 0:01:21
mongodb                          RUNNING   pid 1491, uptime 0:01:21
redis                            RUNNING   pid 1490, uptime 0:01:21
rts                              STOPPED   Dec 26 11:40 AM
stdout                           RUNNING   pid 1489, uptime 0:01:21
```

**Restart Backend service to check if backend service starts** 

```
root@ab348246fff8:/appsmith-stacks/logs# supervisorctl restart backend
backend: stopped
backend: started
root@ab348246fff8:/appsmith-stacks/logs# supervisorctl status
backend                          RUNNING   pid 1802, uptime 0:00:12
cron                             RUNNING   pid 1505, uptime 0:01:43
editor                           RUNNING   pid 1502, uptime 0:01:43
mongodb                          RUNNING   pid 1491, uptime 0:01:43
redis                            RUNNING   pid 1490, uptime 0:01:43
rts                              STOPPED   Dec 26 11:40 AM
stdout                           RUNNING   pid 1489, uptime 0:01:43
root@ab348246fff8:/appsmith-stacks/logs# supervisorctl ^C
root@ab348246fff8:/appsmith-stacks/logs# tail -f backend/backend-ab348246fff8.log
Waiting for RTS to start ...
Waiting for RTS to start ...
Waiting for RTS to start ...
Waiting for RTS to start ...
Waiting for RTS to start ...
Waiting for RTS to start ...
Waiting for RTS to start ...
Waiting for RTS to start ...
Waiting for RTS to start ...
Waiting for RTS to start ...
^C
```

**Upon starting RTS the behaviour of backend immediately**
 
```
root@ab348246fff8:/appsmith-stacks/logs# supervisorctl start rts
rts: started
root@ab348246fff8:/appsmith-stacks/logs# tail -f backend/backend-ab348246fff8.log
Starting Backend server...
Load environment configuration
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/appsmith/backend/server.jar!/BOOT-INF/lib/logback-classic-1.2.11.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/appsmith/backend/server.jar!/BOOT-INF/lib/slf4j-reload4j-1.7.36.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
[2022-12-26 11:41:33,796]  - Starting ServerApplication vv1.8.14.1 using Java 11.0.17 on ab348246fff8 with PID 1968 (/opt/appsmith/backend/server.jar started by root in /opt/appsmith/backend)
[2022-12-26 11:41:33,799]  - Running with Spring Boot v2.6.5, Spring v5.3.17
[2022-12-26 11:41:33,803]  - No active profile set, falling back to 1 default profile: "default"
[2022-12-26 11:41:34,615]  - Multiple Spring Data modules found, entering strict repository configuration mode!
[2022-12-26 11:41:34,616]  - Bootstrapping Spring Data Reactive MongoDB repositories in DEFAULT mode.
[2022-12-26 11:41:34,859]  - Finished Spring Data repository scanning in 239 ms. Found 55 Reactive MongoDB repository interfaces.
[2022-12-26 11:41:35,220]  - Multiple Spring Data modules found, entering strict repository configuration mode!
[2022-12-26 11:41:35,221]  - Bootstrapping Spring Data Redis repositories in DEFAULT mode.
```
2022-12-29 14:22:41 +05:30
Shrikant Sharat Kandula
3144c0a452
chore: Add role details in replica set error message (#18472) 2022-11-27 13:46:05 +05:30
dependabot[bot]
cf6f052565
chore: bump minimatch from 3.0.4 to 3.1.2 in /deploy/docker/utils (#18344)
Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2.
- [Release notes](https://github.com/isaacs/minimatch/releases)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-26 12:23:33 +05:30
Sumesh Pradhan
59fc70b36b
feat: appsmith ctl jest with workflow (#17713) 2022-11-01 12:57:41 +05:30
Shrikant Sharat Kandula
71293dec82
Fix sandbox iframe default setting (#17618) 2022-10-17 16:12:56 +05:30
Shrikant Sharat Kandula
b6657771a1
Fix assets not loading in supervisor UI (#17543)
Signed-off-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2022-10-14 13:23:09 +05:30
Shrikant Sharat Kandula
d6b4cb5f19
Fix X-Forwarded-Host with multiple rev-proxies (#16951) 2022-10-14 06:30:27 +05:30
Abhinav Jha
e6b89d03aa
Sandboxed iFrames with srcDoc (#11426)
Change iFrame widgets to use sandbox mode if srcDoc is provided
Allowed options:
`allow-forms allow-modals allow-orientation-lock allow-pointer-lock allow-popups allow-scripts allow-top-navigation-by-user-activation`

Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2022-10-04 15:20:45 +05:30
Sumesh Pradhan
c843f829fd
Set HOSTNAME env for heroku deployment (#17095) 2022-09-29 17:19:24 +05:30
Shrikant Sharat Kandula
24655f6ceb
For paths with an extension, give 404 if missing (#17035) 2022-09-26 09:41:38 +05:30
Shrikant Sharat Kandula
6fc2b1680e
Fix key file permissions error on Windows (#16862) 2022-09-19 13:49:27 +05:30
Goutham Pratapa
b1553e946a
fix: docker entrypoint script to check mongo replicaset (#16751)
Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2022-09-14 20:30:18 +05:30
Sumesh Pradhan
8f01b84fee
Packer script to build AWS and DigitalOcean images (#16617) 2022-09-14 11:03:02 +05:30
Sumesh Pradhan
5a6ab1d094
Fix entrypoint.sh external mongo replica set check (#16151) 2022-09-13 14:14:01 +05:30
Shrikant Sharat Kandula
8a0838505a
All outgoing requests should go through the configured proxy (#14427)
Signed-off-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
2022-09-01 11:16:45 +05:30
Sumesh Pradhan
9cf132f23e
Disable nginx server tokens, set gzip_type to * (#15767) 2022-08-05 16:40:38 +05:30
Shrikant Sharat Kandula
868b385e7b
Change to allow all domains to embed Appsmith apps (#15619)
The control to configure what domains are allowed to embed Appsmith apps is still available, but the default of not allowing anything except for 'self' is changed to allow everything.

While this is convenient, we encourage our users to configure their frame ancestors to limit what domains can embed their Appsmith apps.

Signed-off-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2022-08-02 15:41:52 +05:30
Sumesh Pradhan
edbfef7d51
Auto-backup and cleanup with appsmithctl (#15203)
- Auto-cleanup of backup files using env variable APPSMITH_BACKUP_ARCHIVE_LIMIT (default value is 4) after every backup.
- Updated docker file to include watchtower hook scripts.
- Error mail interval to 6hrs.
2022-07-28 17:45:28 +05:30
Shrikant Sharat Kandula
dd46348981
Fix isset command not found (#14997) 2022-07-25 07:42:48 +05:30
Arpit Mohan
4674be719f
Fixing bug where the Mongo DB URL wasn't being picked up by the billing script (#15378) 2022-07-22 18:11:02 +05:30
Shrikant Sharat Kandula
874b9945f8
Control where embedding of Appsmith is allowed (#15348)
Signed-off-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2022-07-21 13:03:35 +05:30
Goutham Pratapa
b4eddfe61e
feat: add hostname to log file (#15005) 2022-07-21 12:20:15 +05:30
Shrikant Sharat Kandula
647b2cd430
If MongoDB key doesn't exist, create it (#15207)
This can happen during a migration from very old slim-container instance to a fat container setup. Besides, for whatever reason, if the key file is missing, then the instance fails to come up. This fix will ensure that we can recover from that state automatically.
2022-07-20 20:42:23 +05:30
Arpit Mohan
1af9e2042f
chore: Adding the appsmithctl command to estimate the bill for an existing Appsmith user (#15311)
## Description

This PR adds to the `estimate_billing` option to the `appsmithctl` command. This will help existing users estimate their bill when they consider upgrading to the paid edition.

Usage: 
```
appsmithctl estimate_billing 

Options:
  --sessionPrice    The price per active session. Defaults to 0.3 
  --priceCap        The price cap for a user in a given month. Defaults to 15
```

A user can also run the command for various scenarios to determine the optimum capacity tier.

## Type of change

- New feature (non-breaking change which adds functionality)
- This change requires a documentation update

## How Has This Been Tested?

Manually

## Checklist:

- [ ] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
2022-07-20 10:33:47 +05:30
Sumesh Pradhan
85151b845e
appsmithctl backup error logging and mailer (#14797) 2022-07-07 11:19:25 +05:30
Shrikant Sharat Kandula
265cca4003
Proxy arguments so that they are not set when empty (#14508) 2022-06-15 14:01:46 +05:30
Sumesh Pradhan
364c5d6701
Restore encryption sale var typo fix (#14499) 2022-06-15 10:12:54 +05:30
Sumesh Pradhan
b9c5d91968
Backup & Restore commands for appsmithctl (#14270) 2022-06-09 09:14:18 +05:30
Shrikant Sharat Kandula
73e43fadbd
Support for custom CA certificates (#14207)
Signed-off-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2022-06-01 11:14:27 +05:30
Sumesh Pradhan
31c98a8fda
Added healthcheck for editor with https (#13947)
Added a fix for the docker health check on editor with ssl enabled for appsmith-ce fat container and the slim client appsmith-editor
2022-05-27 17:05:21 +05:30
Shrikant Sharat Kandula
f344688b2f
Fix log file location for MongoDB (#13744) 2022-05-11 19:13:30 +02:00
Sumesh Pradhan
5e92d48037
Add healthcheck to docker (#13154) 2022-05-06 11:45:56 +05:30
Sumesh Pradhan
511278f067
Disable auto updates helm and docker-compose doc (#13443) 2022-04-29 17:16:37 +05:30
Sumesh Pradhan
9f2c5dc5f7
Renamed temporary encryption variables in docker entry-point script (#12187) 2022-04-15 17:44:08 +05:30
Sumesh Pradhan
f973c2d86d
fix: removed redundant func call init_ssl_cert (#12854) 2022-04-13 07:56:17 +02:00
Trisha Anand
c37fdb9f1c
fix: Only setting maximum heap size for heroku deployed instances (#12725)
Co-authored-by: Arpit Mohan <mohanarpit@users.noreply.github.com>
2022-04-08 18:48:23 +05:30
Shrikant Sharat Kandula
c6deec2f81
fix: Fix server not starting when custom domain not set 2022-04-08 15:19:11 +05:30
Arpit Mohan
7807d5f5c6 chore: Fixing nginx deployment for non-Heroku deployment 2022-04-07 21:00:17 +02:00
geekup-legodevops
2843da9bfd
Refactor initialize env files flow in entrypoint of container (#12585)
Co-authored-by: phat.ct <phat.ct@geekup.vn>
2022-04-05 20:22:52 +05:30
geekup-legodevops
c210857791
Redis running on 64k pagesize (#12264) 2022-04-01 12:28:03 +05:30
Shrikant Sharat Kandula
9cfb7b38ee
Fix basic auth password index 2022-03-25 12:15:05 +05:30
Shrikant Sharat Kandula
d254e3f0e8
Fix fat container not starting NGINX (#12210) 2022-03-24 14:40:42 +05:30
geekup-legodevops
3fcdcddb04
Capture nginx access and error logs in fat container (#12205) 2022-03-24 13:47:25 +05:30
geekup-legodevops
382ea53ab3
Refactor to deploy Heroku using new Docker image (#9127) 2022-03-24 13:17:36 +05:30
Arpit Mohan
f9b28aedbf
Upgrade boxen, remove yargs and chalk (#12043) 2022-03-24 12:57:46 +05:30
Shrikant Sharat Kandula
4dd0719570
Work with copied cert files after fat migration (#12182) 2022-03-24 06:04:38 +05:30
Shrikant Sharat Kandula
b2e9498f2d
Check Redis URL for localhost as well (#12173) 2022-03-23 17:07:14 +05:30
Shrikant Sharat Kandula
b7884f1feb
Fix replicaset checking with limited permissions (#11969) 2022-03-21 13:47:29 +05:30
geekup-legodevops
70096450d8
Redirect Redis log to supervisord log (#11994) 2022-03-21 11:59:40 +05:30
Sumesh Pradhan
4a19b6789b
Java arguments tuning using env (#11581) 2022-03-17 18:40:51 +05:30
geekup-legodevops
4d7c9b7822
Add script to stop/start MongoDB and Redis if changed (#11894) 2022-03-17 17:58:48 +05:30
Trisha Anand
407d963aa5 Updating it to 10s which was the initial configuration 2022-03-17 17:18:45 +05:30
Trisha Anand
7d35f4b2b0 Update : On CE not waiting for backend to be marked as running 2022-03-17 17:00:47 +05:30
Trisha Anand
42b4a2849e hotfix: Check if the backend is up within 30s to reduce the time it takes for editor to come up on restart 2022-03-17 16:52:24 +05:30
Shrikant Sharat Kandula
a12ed0cc18
Fix nginx not starting in fat container (#11909) 2022-03-16 13:21:25 +01:00
Trisha Anand
78e562cbb3
chore: Increasing the start time check for backend process to stay up to 3.5 minutes to ensure that all the checks have run and some grace time before marking the process to be running. (#11876) 2022-03-15 17:43:02 +05:30
Shrikant Sharat Kandula
f08893f233
fix: Fix removal of env variables not working in NGINX (#11854)
Signed-off-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2022-03-15 13:32:59 +05:30
Shrikant Sharat Kandula
e732190151
fix: Fix special char handling in pre-define env (#11799) 2022-03-11 21:21:17 +05:30
Khoa Huỳnh
e59c69f915
Fix MongoDB permission issue in checking replica set (#11613) 2022-03-10 10:16:16 +05:30
Shrikant Sharat Kandula
993c91e31b
Apply env variables in NGINX config before startup (#11531)
Instead of doing env substitutions at request processing time, do it
before NGINX even starts.
2022-03-09 12:38:48 +05:30
akash-codemonk
a6946fbcf0
fix: end guided tour on exiting editor (#11084) 2022-03-08 20:25:20 +05:30
Shrikant Sharat Kandula
1233f7f7ee
chore: Change watchtower to latest from latest-dev (#11669)
This is because watchtower:latest-dev doesn't run on ARM architectures.
2022-03-07 13:58:20 +05:30
geekup-legodevops
db7a046116
Refactor entrypoint script to support migrate slim to fat container (#11519) 2022-03-03 08:40:29 +05:30
geekup-legodevops
762357e97c
Remove curl call to download certbot config files for ssl (#11372) 2022-03-03 08:39:21 +05:30
Ankita Kinger
13fe125a0c
feat: Add disconnect button on auth config pages and form login callout banner (#11389)
* added form login callout banner

* form login config page changes

* form login config page changes

* added redirecturl and uneditable field components

* added disconnect button on auth pages

* Added env variables for form login auth page

* added disconnect button on auth pages

* updated docs link for dform login callout doc

* added condition for disconnect button

* added ce changes done on ee

* updated css

* suggested changes in PR review

* suggested changes in PR review

* suggested changes in PR review

* reverted gitignore files changes

* reverted gitignore files changes

* updated logic for saving admin settings

* removed unused imports

* added changes for taginput field

* removed console

* removed warning

* removed unwanted changes
2022-03-02 23:48:50 +05:30
Shrikant Sharat Kandula
cd8db7fbc2
chore: Use latest-dev for watchtower (#11369) 2022-02-23 21:48:41 +05:30
Abhinav Jha
938edd5284
chore: Remove old way of adding feature flags (#11213)
* Remove optimizely, as it isn't being used anymore from the frontend codebase

* Remove optimizely references form netlify config, vercel config, index.html, docker script, nginx templates and example .env file
2022-02-16 19:57:58 +05:30
geekup-legodevops
2d8e7fee0d
Enable replicaset on local MongoDB only (#10010) 2022-02-09 14:32:46 +05:30
geekup-legodevops
e85b34d66e
Add Helm configMap to update application configuration (#10157) 2022-01-31 13:27:01 +05:30
dependabot[bot]
23c792e94c
chore: bump shelljs from 0.8.4 to 0.8.5 in /deploy/docker/utils (#10415)
Bumps [shelljs](https://github.com/shelljs/shelljs) from 0.8.4 to 0.8.5.
- [Release notes](https://github.com/shelljs/shelljs/releases)
- [Changelog](https://github.com/shelljs/shelljs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/shelljs/shelljs/compare/v0.8.4...v0.8.5)

---
updated-dependencies:
- dependency-name: shelljs
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-15 03:53:08 +05:30
Shrikant Sharat Kandula
42dd099b11
Set MongoDB Key permissions everytime (#10080) 2022-01-10 17:19:29 +05:30
Shrikant Sharat Kandula
023949626d
Fix missing acme route in NGINX HTTPS config (#10094)
Signed-off-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2022-01-01 11:39:49 +05:30
Shrikant Sharat Kandula
8411e35999
Fix custom domain's env variable name (#10092) 2021-12-31 18:04:10 +05:30
Subin Mathew
5e0ee52ff5
Update docker compose file to have update schedule to 1 hour (#9943) 2021-12-23 10:48:26 +05:30
geekup-legodevops
daf60fab72
Add appsmithctl command to migrate instance to new server (#9508) 2021-12-17 10:39:20 +05:30
Shrikant Sharat Kandula
dd52961850 Fix fat image not being pushed to DockerHub
Signed-off-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2021-12-17 06:42:17 +05:30
Shrikant Sharat Kandula
334e1dce1d
ci: Run a small test on fat image before pushing to DockerHub (#8619) 2021-12-12 14:34:17 +05:30
Shrikant Sharat Kandula
3c259386ff
fix: Add fix for log4j2 RCE (#9706)
Ref: https://spring.io/blog/2021/12/10/log4j2-vulnerability-and-spring-boot.

Signed-off-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2021-12-11 09:54:38 +05:30
Shrikant Sharat Kandula
4612607122
Set default APPSMITH_GIT_ROOT value in Docker (#9666) 2021-12-09 12:11:34 +05:30
geekup-legodevops
31a4d14196
Add flow to generate Nginx HTTP only if provision cert fail (#9546) 2021-12-07 15:37:51 +05:30
geekup-legodevops
885f9675c2
Add confirmation step in importing DB command (#9265) 2021-11-26 15:40:16 +05:30
Shrikant Sharat Kandula
94f5a87cdd
Load env variables at start of backend and rts (#9325)
Signed-off-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2021-11-24 20:22:22 +05:30
Shrikant Sharat Kandula
f3ad4ef9bb Fix variable escaping in docker entrypoint script
Signed-off-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2021-11-23 15:53:04 +05:30
Shrikant Sharat Kandula
b86abeadc0 Include origin_scheme in new nginx configs
Signed-off-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2021-11-23 13:47:44 +05:30
Shrikant Sharat Kandula
768885822b
Fix deleting files when they don't exist 2021-11-23 12:13:10 +05:30
geekup-legodevops
5ec733e5a2
Refactor to generate nginx config file with auto-redirect HTTPS (#9256)
Refactor flow to generate nginx configuration file corresponding Custom domain set up

Add 2 template for Nginx template for HTTP and HTTPS. HTTPS contains new block for auto-redirect for HTTPS
2021-11-23 11:22:09 +05:30
geekup-legodevops
5e1a496349
Config for editor program run script instead of nginx (#8922)
Add script to re-generate nginx config file & start nginx

Move function init_ssl_cert into separated file and reuse it in new script and entrypoint

Change command config & add new config to kill all sub-process of a supervisord child program in editor program configure file
2021-11-23 09:39:13 +05:30
Shrikant Sharat Kandula
afeeb414dc
Fix OAuth failing when there's SSL termination (#9286)
Signed-off-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2021-11-23 08:15:35 +05:30
geekup-legodevops
d3a491f0b3
Add flow to use custom certificate if provided (#9106)
- Add sub-directory for user to put custom certificate to use inside container
- Add flow to check existing custom certificate & process to use it
- Add section Custom Certificate in README.md
2021-11-16 16:32:28 +05:30
Shrikant Sharat Kandula
eadaa65251
Fix sessions being cleared after fat container is restarted (#9112) 2021-11-15 11:24:45 +05:30
Joshua Lund
a874b36b11
fix: Remove duplicate APPSMITH_MAIL_ENABLED env variable. Fixes #8852. (#8853) 2021-10-27 21:39:37 +05:30
geekup-legodevops
6cbe4b8faf
Config supervisord to write logs into log files (#8145) 2021-10-19 12:59:55 +05:30
Shrikant Sharat Kandula
8590ff3b75
Remove optimizely route (#8345) 2021-10-08 18:24:14 +05:30
Shrikant Sharat Kandula
5a0d04bce6
Apply env variable renaming automatically (#8217) 2021-10-05 20:49:22 +05:30
Shrikant Sharat Kandula
69015645d2
Fix telemetry docs link 2021-10-05 17:09:33 +05:30
geekup-legodevops
f37f9451ef
feat: Support building Docker image for ARM arch (#7832) 2021-09-29 14:33:27 +05:30
Shrikant Sharat Kandula
40c00c3a98
Fix RTS routing in fat container (#7775) 2021-09-24 08:20:20 +05:30
Shrikant Sharat Kandula
f0a61285a6
docs: Fat container documentation fixes (#7207)
Added additional details about how to use the fat container, and how to manage / maintain it.

Also includes some refactorings that shouldn't affect the functionality significantly.
2021-09-14 19:01:06 +05:30