The deployment script does not currently check whether the API container is successfully running. This is due a race condition where processing returns to the script after the container is running, but potentially before the API has started.
TODO:
Move the curl logic from deploy-stage.sh into a healthcheck script to be included in the API image.
Modify the Dockerfile to use the HEALTHCHECK directive, specifying the aforementioned healtcheck script.
Check the container's Status property using docker ps --format {{.Status}}
The deployment script does not currently check whether the API container is successfully running. This is due a race condition where processing returns to the script after the container is running, but potentially before the API has started.
TODO:
docker ps --format {{.Status}}