Skip to content

Commit

Permalink
Add psycopg config and additional health test
Browse files Browse the repository at this point in the history
  • Loading branch information
CannonLock committed Oct 17, 2024
1 parent ef97abb commit cb29521
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 4 additions & 3 deletions macrostrat_db_insertion/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ RUN apt-get update && apt update -y && apt upgrade -y
RUN apt install -y g++ \
wget \
git \
curl

curl \
libpq-dev

RUN wget \
https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
&& bash Miniconda3-latest-Linux-x86_64.sh -b -p /conda \
&& rm -f Miniconda3-latest-Linux-x86_64.sh
&& rm -f Miniconda3-latest-Linux-x86_64.sh

ENV PATH=${PATH}:/conda/bin
# Enables "source activate conda"
Expand Down
6 changes: 4 additions & 2 deletions macrostrat_db_insertion/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,8 @@ async def record_run(

@app.get("/health")
async def health(
session = Depends(get_session)
session = Depends(get_session),
user_id = Depends(get_user_id)
):

health_checks = {}
Expand All @@ -792,7 +793,8 @@ async def health(

return JSONResponse(content={
"webserver": "ok",
"healthy": health_checks
"healthy": health_checks,
"Logged In `user_id`": user_id
})


Expand Down

0 comments on commit cb29521

Please sign in to comment.