Giter VIP home page Giter VIP logo

runpix-face's Introduction

RUN PIX FACE

This sample shows how to deploy a Hello World application to Cloud Run.

setup

run time

gcloud config set project run-pix gcloud auth application-default login

test

Subscription name: projects/run-pix/subscriptions/faceid-processor Topic name: projects/run-pix/topics/faceid

gcloud run services add-iam-policy-binding runpix-face --member=serviceAccount:[email protected] --role=roles/run.invoker --project run-pix

Env

BUCKET : bucket GOOGLE_APPLICATION_CREDENTIALS: service account

Local Development

UT

npx mocha -grep Float32Array test/test_firestore.js

npm run e2e-test

export SERVICE_NAME=helloworld
export CONTAINER_IMAGE=gcr.io/${GOOGLE_CLOUD_PROJECT}/helloworld
npm run e2e-test

Using Testing Scripts

url.sh

The url.sh script derives the automatically provisioned URL of a deployed Cloud Run service.

export SERVICE_NAME=helloworld
export REGION=us-central1
test/url.sh

deploy.sh

The deploy.sh script deploys a Cloud Run service.

export SERVICE_NAME=helloworld
export CONTAINER_IMAGE=gcr.io/${GOOGLE_CLOUD_PROJECT}/helloworld
export REGION=us-central1
test/deploy.sh

runner.sh

The runner.sh script:

  • Deploys the service to Cloud Run based on the deploy.sh script.
  • Sets the BASE_URL and ID_TOKEN environment variables.
  • Runs any arguments passed to the runner.sh script.
  • Tears down the Cloud Run service on completion.
test/runner.sh sleep 20

Environment Variables (Testing)

  • BASE_URL: Specifies the Cloud Run service URL for end-to-end tests.
  • ID_TOKEN: JWT token used to authenticate with Cloud Run's IAM-based authentication.
  • REGION: [us-central1] Optional override region for the location of the Cloud Run service.
  • SERVICE_NAME: The name of the deployed service, used in some API calls and test assertions.

Dependencies

  • express: Web server framework.
  • got: [Testing] Used to make HTTP requests of the running service in end-to-end testing.

[https://www.google.com]

runpix-face's People

Contributors

avinashmane avatar

Watchers

 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.