Install dependencies with pip:
pip install -r requirements.txt
Create a .env
file with the Oracle database information:
echo "DB_URL=localhost/BASE\nUSERNAME=sys\nPASSWORD=pass" >> .env
To run the project use uvicorn
:
uvicorn main:app --reload
To run the project with Docker:
-
Create
.env.Dockerfile
where localhost is replaced with Docker'shost.docker.internal
:echo "DB_URL=host.docker.internal/BASE\nUSERNAME=sys\nPASSWORD=pass" >> .env.docker
-
Build the image:
docker build -t geom_viewer_api .
-
Run the image:
docker run --name geom_api --rm -p 8023:8023 --env-file .env.docker geom_viewer_api