✅ Docker Compose problem with command execution after start
Hi guys, I'm trying to execute bash commands from my .NET API to migrate my entities into my PostgreSQL database in another container, here is how my docker-compose looks like:
When I run the docker compose it throws an exit code of 255 from my api container, but if I go inside it after the containers are running and execute the
When I run the docker compose it throws an exit code of 255 from my api container, but if I go inside it after the containers are running and execute the
/config/api.sh command again it executes fine and run the migrations. Am I doing the post_start wrong? Shouldn't the API container only run when the database is healthy? How can I fix this or maybe check in my shell script if the database is accessible? Thanks!!