Performance studio backend and frontend
February 29, 2024 ยท View on GitHub
Running the backend locally
Pre-requisites
- Python 3.12 or higher is installed on your machine.
- Running
deploy/docker-compose.ymlwithout the webapp service - that way you will be covered with all the dependencies, like databases and other services.
Now we need to install the dependencies:
cd src/gprofiler
pip install -e ../gprofiler-dev[postgres]
pip install -e .
Running the backend
To run the backend, you need to set the following environment variables:
BUCKET_NAME- S3 bucket nameQUERY_API_BASE_URL- runningsrc/gprofiler_flamedb_resthttp://localhost:8080SQS_INDEXER_QUEUE_URL- SQS queue nameGPROFILER_POSTGRES_DB_NAMEGPROFILER_POSTGRES_PORTGPROFILER_POSTGRES_HOSTGPROFILER_POSTGRES_USERNAMEGPROFILER_POSTGRES_PASSWORDAPP_LOG_FILE_PATH- path to the application log fileAPP_LOG_LEVELAWS_METADATA_SERVICE_NUM_ATTEMPTS- number of attempts to get the AWS credentialsREDIRECT_DOMAIN- domain name for the installation instruction generation in UISQS_ENDPOINT_URL- SQS endpoint URL, by defaulthttps://sqs.${AWS_REGION}.amazonaws.comAWS_ACCESS_KEY_ID- AWS credentials, if empty is taken from the metadata serviceAWS_SECRET_ACCESS_KEYAWS_SESSION_TOKEN
Now you can run the backend:
python3 -m uvicorn backend.main:app --reload --port 8000
Running the frontend locally
cd src/gprofiler/frontend
yarn install
yarn start