Code Monkey home page Code Monkey logo

covid-crazy-eight's Introduction

covid-crazy-eight

Bare Bones Webapp to Play Crazy Eights with friends while quarantines

To run

DEBUG=true PLAYERS=Joe,Eve,Tim python src/app.py

I'll probably cut a lot of corners while making this. To build and run in Docker

docker build --tag dhermes/covid-crazy-eight:latest --file Dockerfile .
docker run \
  --rm \
  --interactive \
  --tty \
  --env DEBUG=true \
  --env PLAYERS=Joe,Eve,Tim \
  --publish 15071:15071 \
  dhermes/covid-crazy-eight:latest

To deploy to Google Cloud Run:

gcloud auth login                          # Make sure logged in
gcloud auth list                           # Double check logged in account
gcloud projects list                       # Pick a project
PROJECT_ID="<project_id>"                  # Use PROJECT_ID (not name or number)
gcloud config set project "${PROJECT_ID}"  # Set PROJECT_ID
# Use Google Cloud Build to build the image
gcloud builds submit --tag "gcr.io/${PROJECT_ID}/covid-crazy-eight:latest"
# Deploy to Google Cloud Run
gcloud run deploy \
  --image "gcr.io/${PROJECT_ID}/covid-crazy-eight" \
  --set-env-vars '^:^PLAYERS=Larry,Sergey,Sundar' \
  --port 15071 \
  --max-instances 1 \
  --allow-unauthenticated \
  --region us-west1 \
  --platform managed \
  covid-crazy-eight
# Clean up after the game has ended
gcloud run services delete \
  --region us-west1 \
  --platform managed \
  covid-crazy-eight
# Clean up container after you're really extra super done
gcloud container images list
gcloud container images delete "gcr.io/${PROJECT_ID}/covid-crazy-eight:latest"
# Look for (and delete) old builds that are still hanging around
gcloud container images list-tags "gcr.io/${PROJECT_ID}/covid-crazy-eight"
gcloud container images delete "gcr.io/${PROJECT_ID}/covid-crazy-eight@sha256:${DIGEST}"
# Consider deleting logs from Cloud Build runs
gsutil ls "gs://${PROJECT_ID}_cloudbuild/"
gsutil ls "gs://${PROJECT_ID}_cloudbuild/source/"

covid-crazy-eight's People

Contributors

dependabot[bot] avatar dhermes avatar

Watchers

 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.