diff --git a/data/infra/swoole.Dockerfile b/data/infra/swoole.Dockerfile index 77844ca7..40293eaa 100644 --- a/data/infra/swoole.Dockerfile +++ b/data/infra/swoole.Dockerfile @@ -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