Skip to content

Nginx Reverse Proxy for the Office of Police Oversight forms

Notifications You must be signed in to change notification settings

cityofaustin/opo-pr-viewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OPO's pr-viewer

The problem this application solves:

  • OPO Forms use React Router, which as you may already know, uses the browser URI rules to identify which components to render. This can cause problems if the server is not configured accordingly.
  • S3 does not work well with react router, it does not have capacity for complex custom rules that can allow react router to work well with the backend.

The purpose of the PR viewer is to be a layer on top of S3, it basically runs Nginx which has great routing capabilities, and we configure it as a proxy between react and s3:

[Client / Browser] <-> [React] <-> [Nginx] <-> [S3]

To run:

git clone https://github.com/cityofaustin/opo-pr-viewer

cd opo-pr-viewer

docker build --no-cache -f Dockerfile -t cityofaustin/opo-pr-viewer .

docker run -it --rm -p 80:80/tcp cityofaustin/opo-pr-viewer

Once running, try this in your browser:

http://localhost/police-complain-pr-97/ http://localhost/police-thank-pr-31/

You should also see PRs built in the cloud, like spanish versions:

http://localhost/policia-queja-pr-97/ http://localhost/policia-agradezca-pr-31/

About

Nginx Reverse Proxy for the Office of Police Oversight forms

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published