A Python application for creating and playing Jeopardy games.
- Docker
- Docker-compose
- Google oauth credentials
- Create RSA key pair
- Log in at https://console.cloud.google.com.
- Create a new project.
- Configure the OAuth consent screen (hamburger menu: APIs & Services --> OAuth consent screen).
- Create new OAuth client ID credentials (hamburger menu: APIs & Services --> Credentials).
- Store the newly generated client ID and secret values in the .env file.
For local development, these settings work well:
- Application type: web application
- Authorized JavaScript origins:
- Authorized redirect URIs:
openssl genrsa -out jwt-rsa256 4096
openssl rsa -in jwt-rsa256 -pubout > jwt-rsa256.pub
The application can be run locally via Docker:
git clone git@github.com:lekha/jeopardy
cd jeopardy
cp .env.example .env
# modify .env file to have appropriate secrets
docker network create secure-docker-socket
docker-compose build
docker-compose run --rm --workdir /database backend yoyo apply
docker-compose up ingress
curl http://127.0.0.1/health-check
Tests can be run locally via Docker:
docker-compose -f docker-compose.test.yml build
docker-compose -f docker-compose.test.yml up test_backend
To apply:
docker-compose run --rm --workdir /database backend yoyo apply
To rollback:
docker-compose run --rm --workdir /database backend yoyo rollback
To see migration status:
docker-compose run --rm --workdir /database backend yoyo list