Skip to content

PHP code to determine which reality (Server OS and web app versions) the app is running in (yeah... it's a play on Rick and Morty)

Notifications You must be signed in to change notification settings

ryananicholson/which-reality

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

which-reality

PHP code to determine which reality (Server OS and web app versions) the app is running in (yeah... it's a play on Rick and Morty)

RickAndMortyImage

Azure

Deploying to Azure Web Apps

  1. From Azure CloudShell, run the following (you may see a urllib3 error... this is expected):

    git clone https://github.com/ryananicholson/which-reality --branch i01
    cd which-reality
    az webapp up --runtime PHP:8.1 --sku B1 --os linux
  2. Acquire URL for web app.

    az webapp list --query [].defaultHostName --output tsv

Tearing Down Resource Group

WARNING! This assumes you only have this ONE web app. Tear down manually in the Azure Portal if you have other web apps as this may destroy those as well!

  1. Acquire the resource group that was automatically created for this web app.

    RESOURCE_GROUP=$(az webapp list --query [].resourceGroup --output tsv)
  2. Delete the resource group.

    az group delete --name $RESOURCE_GROUP

GCP

Deploying to GCP App Engine

  1. From GCP CloudShell, connect your GCP account and follow the prompts to login:

    gcloud account login
  2. Now, run the following commands:

    git clone https://github.com/ryananicholson/which-reality --branch i01
    cd which-reality
    gcloud app deploy
  3. If prompted to Authorize Cloud Shell, click AUTHORIZE.

  4. When prompted to continue, type Y and Enter.

  5. When finished, run the following to retrieve your app's URL:

    gcloud app browse

Disabling the App

  1. Go here and disable the application: https://console.cloud.google.com/appengine/settings

About

PHP code to determine which reality (Server OS and web app versions) the app is running in (yeah... it's a play on Rick and Morty)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published