A Conversational Movie Recommendation App
cd src && PYTHONPATH=$PWD RELOAD=true python backend/app/main.py
cd src && streamlit run frontend/app/main.py
cd src && docker build -f backend/Dockerfile -t robot-ebert-fastapi . && cd -
docker run -p 8080:8080 --env-file .env robot-ebert-fastapi
cd src && docker build -f frontend/Dockerfile -t robot-ebert-streamlit . && cd -
docker run -p 8501:8501 --env-file .env robot-ebert-streamlit
export PROJECT_ID="robot-ebert"
export LOCATION="us-west1"
export REPO_NAME="robot-ebert"
export REPO_DESCRIPTION="container images for the Robot Ebert movie recommender application"
gcloud auth login
gcloud artifacts repositories create ${REPO_NAME} --repository-format=docker --location=${LOCATION} --description=${REPO_DESCRIPTION}
gcloud artifacts repositories list
gcloud auth configure-docker ${LOCATION}-docker.pkg.dev
export IMAGE_NAME="robot-ebert-fastapi"
export SERVICE_NAME="robot-ebert-fastapi"
cd src && docker build --platform linux/amd64 -f backend/Dockerfile -t ${IMAGE_NAME} . && cd -
docker tag ${IMAGE_NAME}:latest ${LOCATION}-docker.pkg.dev/${PROJECT_ID}/${REPO_NAME}/${IMAGE_NAME}:latest
docker push ${LOCATION}-docker.pkg.dev/${PROJECT_ID}/${REPO_NAME}/${IMAGE_NAME}:latest
gcloud run deploy ${SERVICE_NAME} --image ${LOCATION}-docker.pkg.dev/${PROJECT_ID}/${REPO_NAME}/${IMAGE_NAME}:latest --platform managed --region $LOCATION
export IMAGE_NAME="robot-ebert-streamlit"
export SERVICE_NAME="robot-ebert-streamlit"
cd src && docker build --platform linux/amd64 -f frontend/Dockerfile -t ${IMAGE_NAME} . && cd -
docker tag ${IMAGE_NAME}:latest ${LOCATION}-docker.pkg.dev/${PROJECT_ID}/${REPO_NAME}/${IMAGE_NAME}:latest
docker push ${LOCATION}-docker.pkg.dev/${PROJECT_ID}/${REPO_NAME}/${IMAGE_NAME}:latest
gcloud run deploy ${SERVICE_NAME} --image ${LOCATION}-docker.pkg.dev/${PROJECT_ID}/${REPO_NAME}/${IMAGE_NAME}:latest --platform managed --region $LOCATION
gcloud auth application-default login
cd app && python database.py && cd -
- Whitelist Your Client IP: CloudSQL > Instances >
${INSTANCE_NAME}
> Networking > Add a Network >${CLIENT_PUBLIC_IP}
- Add a New Server in pgAdmin: Servers > Register > Server:
- Host:
${SERVER_PUBLIC_IP}
- User:
postgres
- Pass:
POSTGRES_PASSWORD
(GCP Secrets Manager) - Port: 5432
- Host: