Backend server-side code for the orphaned wells UI
Backend infrastructure automation and the approval-gated deployment rollout are
documented in Terraform CI. Cloud plan/apply is disabled
until ENABLE_TERRAFORM_CI=true; phase one retains the existing deployment key.
Terraform PRs, including forks, run formatting and validation without cloud
credentials or remote state. Live plans run from reviewed main; plans with
changes require separate terraform-apply approval. Verified no-change plans
finish automatically without applying. Manual Terraform
plan/apply remains supported in the deployment guide. Existing installations
should follow the PR workflow migration.
The following steps assume that:
condais already installed and configured
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-envThis 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 .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.txtCredentials are necessary for MongoDB, Google Cloud Storage uploads, and Google Document AI processing.
Create the backend environment file from the template:
cp ogrre/.env.example ogrre/.envFill in the required values described in ogrre/.env.example.
For Google-backed non-Docker local development, place these local service-account JSON keys in ogrre/, or use absolute paths in .env:
storage-service-key.json- Storage runtime service account.
- Used only for Google Cloud Storage upload bucket reads, writes, deletes, and signed/download URL interactions.
STORAGE_SERVICE_KEYin.envmust point to this file.
document-ai-service-key.json- Document AI runtime service account.
- Used for online/batch Document AI processing and processor deployment/undeployment from the app.
DOCUMENT_AI_SERVICE_KEYin.envmust point to this file.
Do not use the deployment/Terraform service-account key for local app runtime. That identity is for infrastructure changes and Kubernetes/App Engine deployment automation.
conda activate uow-server-envcd <orphaned-wells-ui-server-path>
uvicorn ogrre.main:app --reload --host 127.0.0.1 --port 8001For Docker-based local development, place the same two runtime key files at deployment/secrets/storage-service-key.json and deployment/secrets/document-ai-service-key.json, then run the backend container:
cd <orphaned-wells-ui-server-path>/deployment
docker compose --env-file ../ogrre/.env up web