Coder Social home page Coder Social logo

notifications-paas-route-service's Introduction

Notify PaaS Route Service

This is a Nginx application which is a proxy for all apps that run on the PaaS and restricts access to them by IP address.

If a user's IP address is not in our allowed list then we can instead allow access using a username and password.

We currently use this in preview and staging to make sure only our team can access our preview and staging environments.

Requirements

Deployment

The default application name is "route-service". If you want to change this (or you want to deploy multiple route services), set the PAAS_APP_NAME environment variable for the make commands.

The default domain name is "cloudapps.digital". If you want to change this (or you want to bind to different domains), set the PAAS_DOMAIN environment variable for the make commands.

The secret values are read from the notifications-credentials repository using pass, so you have to set the NOTIFY_CREDENTIALS environment variable to your local credentials repository path. The values are read from credentials/http_auth/notify/password.

The instance count can be set with the PAAS_INSTANCES environment variable (1 by default).

Deploying the route service application

If you're deploying the very first time, simply run:

make <PaaS space> cf-push

For zero-downtime deployments use the following command:

make <PaaS space> cf-deploy

If the zero-downtime deployment couldn't finish you can rollback to the previous version:

make <PaaS space> cf-rollback

Registering the application as a user-provided service

You only need to do this once per PaaS space.

make <PaaS space> cf-create-route-service

Register the application as a route-service for a route

You only need to do this once per PaaS space and for all routes.

make <PaaS space> <app_name> cf-bind-route-service

Where app_name either admin or api which will bind the www. or api. subdomain respectively.

Complete installation example

In this example we are deploying the route service to preview and binding two applications to it, which are accessible on app-01.cloudapps.digital and app-02.cloudapps.digital.

# First installation:
make preview cf-push
make preview cf-create-route-service

# Run this for every applicaton once
make preview cf-bind-route-service SUBDOMAIN=app-01
make preview cf-bind-route-service SUBDOMAIN=app-02

# For any future deployments only run:
make preview cf-deploy

notifications-paas-route-service's People

Contributors

allait avatar bandesz avatar benthorner avatar idavidmcdonald avatar leohemsted avatar mogul avatar quis avatar rjbaker avatar sakisv avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.