Skip to content

Repository files navigation

orphaned-wells-ui-server

Backend server-side code for the orphaned wells UI

Getting started (developer)

Prerequisites

The following steps assume that:

  1. conda is already installed and configured

1. Creating the Conda environment

Run the following command to create and activate a new Conda environment named uow-server-env:

conda env create --file environment.yml && conda activate uow-server-env

This will install the correct runtime versions of the backend (Python) and the backend dependencies.

Alternatively, if you already have an environment that you would like to install the dependencies in, activate your environment and run the command:

pip install .

For Developers:

This section is for developers who plan to modify or contribute to the server's codebase. In the same environment where you installed the package, run the following command:

pip install -r requirements-dev.txt

2. Add credential/environment files

Credentials are necessary for backend functionality. This includes Google Cloud's document AI features, MongoDB database access, and Google Cloud Storage for storing documents/images. To access these functionalities, you must create the following credential files and place them in the < orphaned-wells-ui-server-path >/ogrre/internal/ directory:

  1. .env
    • Must contain PROJECT_ID, LOCATION, PROCESSOR_ID, DB_USERNAME, DB_PASSWORD, STORAGE_SERVICE_KEY (3rd item on this list)
  2. creds.json
  3. STORAGE_SERVICE_KEY file

Running the server

Ensure that the uow-server-env Conda environment is active

conda activate uow-server-env

Start server on port 8001

cd <orphaned-wells-ui-server-path>/app && uvicorn main:app --reload --host 127.0.0.1 --port 8001

About

Backend server-side code for the orphaned wells UI

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages