question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fix the healthcheck port and add `curl` to the fidesctl container

See original GitHub issue

With the recent update, ‘docker-compose up -d’ did not start postgre database properly. Also, fidesctl container becomes unhealthy. I am suggesting the following change to address these issues.

  • add ./ like - ./postgres-data:/var/lib/postgresql/data volume mapping
  • install curl in fidesctl container
  • correct healthcheck test so it refers to 8080 instead of 8000
diff --git a/.gitignore b/.gitignore
index 5435b80..ed9ec1d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -207,3 +207,6 @@ venv.bak/
 .mypy_cache/
 .dmypy.json
 dmypy.json
+
+# postresSQL data
+postgres-data/
diff --git a/docker-compose.yml b/docker-compose.yml
index b753e35..3a64874 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -5,7 +5,7 @@ services:
       dockerfile: Dockerfile
     command: uvicorn --host 0.0.0.0 --port 8080 --reload fidesapi.main:app
     healthcheck:
-      test: ["CMD", "curl", "-f", "http://0.0.0.0:8000/health"]
+      test: ["CMD", "curl", "-f", "http://0.0.0.0:8080/health"]
       interval: 5s
       timeout: 5s
       retries: 5
@@ -32,7 +32,7 @@ services:
       timeout: 5s
       retries: 5
     volumes:
-      - postgres:/var/lib/postgresql/data
+      - ./postgres-data:/var/lib/postgresql/data
     expose:
       - 5432
     ports:
diff --git a/fidesctl/Dockerfile b/fidesctl/Dockerfile
index 16bf4af..02f9c8b 100644
--- a/fidesctl/Dockerfile
+++ b/fidesctl/Dockerfile
@@ -3,6 +3,7 @@ FROM python:3.8-slim-buster
 # Install auxiliary software
 RUN apt-get update
 RUN apt-get install -y \
+    curl \
     git \
     ipython \
     make \

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ThomasLaPianacommented, Nov 18, 2021

oh I see, sorry about that! We should’ve added a note about that change

We’ve also updated the installation guide and quick starts to not point end-users at the development docker-compose.yml and Makefile, this increases stability for end-users as well. https://ethyca.github.io/fides/installation/installation/

So in summary, for this issue we’ll go ahead and fix the healthcheck port as well as add curl to the container for better debugging

fyi @earmenda

0reactions
ThomasLaPianacommented, Nov 19, 2021

@earmenda i just went ahead and made these changes in #236 since they’re small and I needed to fix the health check for the testing I was doing anyway 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

APIv2 healthcheck: hang while cURLing when the ...
The cURL command will hang when using APIv2 for healthcheck. And there will be a process podman heathcheck run ..... always running in...
Read more >
adding health check to docker container - nginx
I gave up on using the HEALTHCHECK command in Dockerfile and instead I am changing the nginx.conf file by adding
Read more >
How To Successfully Implement A Healthcheck In Docker ...
Configure a health check within the compose file. As an example, the docker-compose.very-simple-web.yml will be extended by a simple curl based ...
Read more >
Troubleshoot Amazon ECS task container health check ...
My Amazon Elastic Container Service (Amazon ECS) task is failing the container heath check. How do I resolve this?
Read more >
Docker healthchecks: why you shouldn't use `curl` or `iwr`
Most HEALTHCHECK examples use curl on Linux and iwr on Windows. That adds a dependency on an external tool and limits portability.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found