Updated swoole docker image so that it retries the start command until status code is 0

This commit is contained in:
Alejandro Celaya 2018-11-25 12:44:49 +01:00
parent f0330e9ae3
commit 22b02de405

View file

@ -92,4 +92,7 @@ WORKDIR /home/shlink
# Expose swoole port
EXPOSE 8080
CMD /usr/local/bin/composer update && php ./vendor/bin/zend-expressive-swoole start
CMD /usr/local/bin/composer update && \
# When restarting the container, swoole might think it is already in execution
# This forces the app to be started every second until the exit code is 0
until php ./vendor/bin/zend-expressive-swoole start; do sleep 1 ; done