GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — bloom/backend/proxy at main · CityOfDetroit/bloom

Expand file tree

/

proxy

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
 
 
/

proxy

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Dockerfile
Dockerfile
 
 
README.md
README.md
 
 
default.conf
default.conf
 
 
proxy.conf
proxy.conf
 
 
shared-location.conf
shared-location.conf
 
 

README.md

Outline

Rationale

We want to serve different versions of the API under different paths e.g. /v2, /v3 but not necessarily reflect that convention in the code. To achieve that an NGINX proxy has been created and set up as an entrypoint to the entire API. It provides path level routing e.g. /v2 will be routed to a different heroku APP then /.

Running Locally with Docker Desktop

make sure Docker Desktop is started

build the image: docker build --pull --rm -f "backend/proxy/Dockerfile" -t bloom:latest "backend/proxy"

In the Docker Desktop Dashboard, go to "Images", find the image and click "Run" (play button)

Configure Optional Settings before running:

Ports -> Host Port: 9000

Environment Variables:

- PORT: 80
- BACKEND_HOSTNAME: [Your local IP]:3100 (e.g. 192.168.86.231:3100)
- PROTOCOL: http
- ALLOW_LIST: localhost:3000|localhost:3001

Run and you should be able to access listings at http://localhost:9000/listings

Setup

Based on this tutorial. All values are for bloom-reference-backend-proxy and each environment requires it's own proxy.

Install the Heroku CLI

Download and install the Heroku CLI.

If you haven't already, log in to your Heroku account and follow the prompts to create a new SSH public key.

$ heroku login

Log in to Container Registry

You must have Docker set up locally to continue. You should see output when you run this command.

$ docker ps

Now you can sign into Container Registry.

$ heroku container:login

Note if you are using an Apple M1 device the following steps will not work. You will have to do the following: https://stackoverflow.com/a/67001433

Push your Docker-based app Build the Dockerfile in the current directory and push the Docker image.

# workdir: backend/proxy
$ heroku container:push --app bloom-reference-backend-proxy web

Deploy the changes Release the newly pushed images to deploy your app.

$ heroku container:release --app bloom-reference-backend-proxy web

Configuration

Heroku Proxy app requires four environment variables to work:

PORT: 443 BACKEND_HOSTNAME: bloom-backend-orm.herokuapp.com PROTOCOL: https ALLOW_LIST: partners.bloom.exygy.dev|bloom.exygy.dev

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.