-
Notifications
You must be signed in to change notification settings - Fork 53
Running nginx locally
alismx edited this page Dec 22, 2022
·
4 revisions
This page helps guide us through setting up Nginx to run locally. This is optional to develop locally. (This setup may be needed to run the E2E tests in Docker. Editor's note: need to check this)
- Install ngnix (Homebrew)
- Copy the repo's
nginx/default.conf
file into your local nginx servers directory. This may look something like:
cp nginx/default.conf /usr/local/etc/nginx/servers/default.conf
- In the newly copied
/usr/local/etc/nginx/servers/default.conf
update any usage of
-
http://frontend:3000
tohttp://localhost:3000
-
http://backend:8080
tohttp://localhost:8080
- Copy the
certs
directory to your local Nginx directory. This may look something like:
cp -r certs /usr/local/etc/nginx
- Open your local
nginx.conf
file in the editor of your choice.
vi /usr/local/etc/nginx/nginx.conf
- In your local
nginx.conf
file, comment out the entireserver
block that is listening on port8080
. For example, the server block may look something like:
server {
listen 8080;
server_name localhost;
...
...
}
-
You should now be able to start Nginx. Run
sudo nginx
. If you need to stop it, runsudo nginx -s stop
. -
Create a '.env.local
file (if you don't have it already) in the repo's
frontend/src` directory
touch frontend/src/.env.local
- Copy and save the content below into that newly created file:
REACT_APP_BASE_URL=https://localhost.simplereport.gov
REACT_APP_BACKEND_URL=https://localhost.simplereport.gov/api
PUBLIC_URL=/app/
REACT_APP_OKTA_ENABLED=true
REACT_APP_DISABLE_MAINTENANCE_BANNER=true
- You should now be able to run the app and access the app via
https://localhost.simplereport.gov
- You may be unable to access the patient experience routes
/pxp
using this setup.
- Getting Started
- [Setup] Docker and docker compose development
- [Setup] IntelliJ run configurations
- [Setup] Running DB outside of Docker (optional)
- [Setup] Running nginx locally (optional)
- [Setup] Running outside of docker
- Accessing and testing weird parts of the app on local dev
- Accessing patient experience in local dev
- API Testing with Insomnia
- Cypress
- How to run e2e locally for development
- E2E tests
- Database maintenance
- MailHog
- Running tests
- SendGrid
- Setting up okta
- Sonar
- Storybook and Chromatic
- Twilio
- User roles
- Wiremock
- CSV Uploader
- Log local DB queries
- Code review and PR conventions
- SimpleReport Style Guide
- How to Review and Test Pull Requests for Dependabot
- How to Review and Test Pull Requests with Terraform Changes
- SimpleReport Deployment Process
- Adding a Developer
- Removing a developer
- Non-deterministic test tracker
- Alert Response - When You Know What is Wrong
- What to Do When You Have No Idea What is Wrong
- Main Branch Status
- Maintenance Mode
- Swapping Slots
- Monitoring
- Container Debugging
- Debugging the ReportStream Uploader
- Renew Azure Service Principal Credentials
- Releasing Changelog Locks
- Muting Alerts
- Architectural Decision Records
- Backend Stack Overview
- Frontend Overview
- Cloud Architecture
- Cloud Environments
- Database ERD
- External IDs
- GraphQL Flow
- Hibernate Lazy fetching and nested models
- Identity Verification (Experian)
- Spring Profile Management
- SR Result bulk uploader device validation logic
- Test Metadata and how we store it
- TestOrder vs TestEvent
- ReportStream Integration
- Feature Flag Setup
- FHIR Resources
- FHIR Conversions
- Okta E2E Integration
- Deploy Application Action
- Slack notifications for support escalations
- Creating a New Environment Within a Resource Group
- How to Add and Use Environment Variables in Azure
- Web Application Firewall (WAF) Troubleshooting and Maintenance
- How to Review and Test Pull Requests with Terraform Changes