Added missing 'install' flag in ENTRYPOINT and added local build for docker image#19
Conversation
|
Thanks so much! I think it would be best to use the pre-built images and simply ensure the version is upgraded to the latest every time. This way the user doesn't need to build and image, and also doesn't need to necessarily clone the webhook repo (as long as they have a copy of the compose file). Also to wait for Central and the DB to start correctly, simply change the depends_on condition for both to |
|
I did what you said. You'll need to update the image and version tag in I also added |
|
Yes I think thats exactly how it should behave! Thanks for testing this out and for the fix 🙏 |
The call to the CLI in the docker container was missing the
installflag. I added it and now the container creates the trigger succesfully by doing thisdocker compose -f docker-compose.yml -f ../central-webhook/compose.webhook.yaml up -d.It also happened that
compose.webhook.ymlwas fetching the docker image from the repo, so that I was not able to test changes to Dockerfile. So, instead of fetching the image from the repo I built the image from Dockerfile.The thing is, by doing this
docker compose -f docker-compose.yml -f ../central-webhook/compose.webhook.yaml up -dall paths are relative to the directory of the first compose file, see this. I thought that the simplest way to fix this was to create a new env variable
CENTRAL_WEBHOOK_PATHto store the absolute path tocentral-webhookfolder and use this env variable incompose.webhook.yml. This is okay for you?Other things that happen is that this docker container is just creating the trigger and then doing nothing. It is also configured with
restart: alwaysso it keeps replacing the trigger and restarting to replace the trigger again.Also, in the beggining, it fails to create the trigger, so the first few restarts are because of the healthcheck you added, I think. Here you have some logs.
PostgreSQL:
central-webhook container:
Instead of
restart: alwaysI think it would be better to userestart: on-failure.And about this connection failure in the beginning I don't know what is the best way to fix it. Maybe by letting
central-webhookwait like 5 mins before doing the first connection?I hope this is helpful.