We normally don’t need Nginx for local development, particularly to serve a frontend app. Can you share details of what you’re working on specifically?
As @samuel34 said, normally you don’t use an nginx deployment for development. Most of our repos provide a start script that will run an individual app using yarn start --sources path/to/app. If you need to make changes to the app shell itself (which is not recommended), the esm-core provides a run:shell script that runs the shell. The default configuration for both of those would load only the code you’re working on locally and proxy to dev3 as a backend.
Thank you for describing the problem and your setup. The official OpenMRS documentation suggests two main deployment paths, including an Nginx/static web server approach for the 3.x frontend. Could you please share the exact Nginx configuration, recommended folder structure, and any CORS/static asset best practices as described in the documentation? For reference, the official guide (https://openmrs.atlassian.net/wiki/spaces/docs/pages/26936930/O3+Setup+Configuration+Deployment#Step-3%3A-Assemble%2C-Build%2C-and-Serve) mentions a ‘Web Server Option’ for serving from Nginx, but the specific steps would be really helpful to ensure my setup matches the documented best practices. A minimal, working example and clarification on serving/importmap handling is much appreciated!
For a production deployment, we use a Docker Compose project setup. In this setup, Nginx is used as the reverse proxy (gateway container) and also serves the frontend asserts (frontend container). That being said, if you want to make changes to the CSP or add CORS support, the Ngnix config of the gateway is the right place.
The other alternative way for deployment that i have find interesting is using Azure DevOps, You set up everything in the pipeline using YAML scripts and you are good to go. One challenge with it is when you need to upgrade any ESM module with in that distribution , You got to write more scripts to that in the pipelines, No straight path .