Commit Graph

44 Commits

Author SHA1 Message Date
Shrikant Sharat Kandula
1d30719e6c
fix: Fix NGINX config template path in cert provisioning script (#26238)
The template script has been moved recently, but it hasn't been updated
here.
2023-08-10 13:07:39 +05:30
Shrikant Sharat Kandula
a44ea34902
chore: Refactor NGINX config templates, merge them, to reduce duplicate code (#26066)
Majority of the NGINX config is the same, for both HTTP and HTTPS.
Having two separate templates for them is making configuration changes
error-prone, where we often risk forgetting making the same change in
the other file.

This PR merges the two files into one, so the above risk isn't there. It
also makes it easier to experiment with the file while developing, since
we have to make every single change twice during development.

Note: This _will_ cause conflicts in sync, after being merged.

Why are we doing this? This will be a step towards simplifying our
`Dockerfile` with reduced layers and improved caching performance. The
image build time in CI should be faster once this is done.
2023-08-09 21:48:58 +05:30
Shrikant Sharat Kandula
7da2560242
chore: Update healthcheck to use health endpoint (#20867)
The health endpoint in the Docker container's healthcheck command is
currently pointing to `/users/me`. But we have a designated endpoint for
this, at `/health`. This PR switches to using this endpoint instead.
2023-08-01 09:58:49 +05:30
Shrikant Sharat Kandula
3129e88e95
chore: Move Maps API Key to database (#20771)
1. Changing the Maps API Key doesn't need restart anymore.
2. The `isRestartRequired` field in the response of updating env
settings, was being ignored. The client owns the decision of when to
restart (which is correct), so removed this from the server.
3. Write Maps API Key to the database, in the tenant configuration.
4. The Settings page for Maps Ke gets the current value from
`/tenant/current` response, and not `/admin/env`.
5. Removed `APPSMITH_GOOGLE_MAPS_API_KEY` from `/admin/env` response.
6. Tests.

DO NOT MERGE. Please only review/approve. This is expected to break EE
once it goes there, which I intend to solve alongside merging this.

Changing the Maps API Key will update it both in the tenant config in
the database, as well as in the `docker.env` file. This is predominantly
for backwards compatibility, and phased rollout. As part of a separate
PR, we'll have a migration that proactively copies the env variable
value to the database, and comment out the value in the `docker.env`
file. Then we can stop updating the `docker.env` file as well.


## New
![Screenshot 2023-02-25 at 7 30 14
AM](https://user-images.githubusercontent.com/120119/221330216-03800c5b-c775-4584-a39f-cd6374ba049b.png)



## Old
![Screenshot 2023-02-25 at 7 23 05
AM](https://user-images.githubusercontent.com/120119/221329747-5431d668-736d-4b08-b504-f64e4edd436b.png)

---------

Co-authored-by: Ankita Kinger <ankita@appsmith.com>
2023-07-24 13:33:53 +05:30
Ivan Akulov
bc0426dad2
perf: prioritize the main bundle over preloads (v2) (#24374) 2023-06-22 10:58:10 +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
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
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
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
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
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
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
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
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
Shrikant Sharat Kandula
dd46348981
Fix isset command not found (#14997) 2022-07-25 07:42:48 +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
Shrikant Sharat Kandula
265cca4003
Proxy arguments so that they are not set when empty (#14508) 2022-06-15 14:01:46 +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
Sumesh Pradhan
5e92d48037
Add healthcheck to docker (#13154) 2022-05-06 11:45:56 +05:30
Sumesh Pradhan
f973c2d86d
fix: removed redundant func call init_ssl_cert (#12854) 2022-04-13 07:56:17 +02:00
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
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
Shrikant Sharat Kandula
4dd0719570
Work with copied cert files after fat migration (#12182) 2022-03-24 06:04:38 +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
Shrikant Sharat Kandula
a12ed0cc18
Fix nginx not starting in fat container (#11909) 2022-03-16 13:21:25 +01:00
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
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
geekup-legodevops
762357e97c
Remove curl call to download certbot config files for ssl (#11372) 2022-03-03 08:39:21 +05:30
geekup-legodevops
e85b34d66e
Add Helm configMap to update application configuration (#10157) 2022-01-31 13:27:01 +05:30
Shrikant Sharat Kandula
8411e35999
Fix custom domain's env variable name (#10092) 2021-12-31 18:04:10 +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
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
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
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
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