Skip to content

Latest commit

 

History

History
75 lines (56 loc) · 1.77 KB

README.md

File metadata and controls

75 lines (56 loc) · 1.77 KB

MovieActorRanking

Build and deploy container app to Azure Web App - api-movieactorranking-prod

documents

requirements

  • Python >=3.7
  • Visual Studio Code

Python

unix/mac

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pip install --upgrade pip

windows

python -m venv .venv
.\.venv\Scripts\activate
pip install -r requirements.txt
pip install --upgrade pip

environment variables

  • copy and rename the .env.sample file to .env

database

docker compose -f docker.compose.yml up -d
prisma db push
sh scripts/import_data.sh

optional: pgadmin

Open http://localhost:5050/

  1. Email: root@root.com
  2. Password: root

Click with the right mouse button on Servers and select Register -> Server.

Connection tab requires to type:

  1. Host name/address: host.docker.internal
  2. Port: 5433
  3. Database: movieactorrankingdb
  4. Username: postgres
  5. Password: postgres

optional: swagger

Open http://localhost:8000/docs to see the swagger UI

optional: Docker

building

docker build --tag tonylukeregistry.azurecr.io/tonylukeregistry/information-retrieval/api:latest .

running container locally

docker run --detach --publish 3100:3100 tonylukeregistry.azurecr.io/tonylukeregistry/information-retrieval/api:latest

optional: azure deployment

change connection string;

postgresql://<dbuser>:<dbpassword>@<dbservername>.postgres.database.azure.com:<port>/<bdname>?schema=public&sslmode=require