diff --git a/novosga-2.2-standalone/Dockerfile b/novosga-2.2-standalone/Dockerfile index 2fffb43..5e3a9c1 100644 --- a/novosga-2.2-standalone/Dockerfile +++ b/novosga-2.2-standalone/Dockerfile @@ -1,4 +1,4 @@ -FROM novosga/novosga:2.2.8 +FROM novosga/novosga:2.2.9 #Set the default parameters ENV APP_ENV=prod \ @@ -29,6 +29,7 @@ RUN curl -fsSLO "$SUPERCRONIC_URL" \ && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic COPY start.sh /usr/local/bin +COPY consumer.sh /usr/local/bin COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf COPY config/crontab /etc/crontab diff --git a/novosga-2.2-standalone/config/supervisord.conf b/novosga-2.2-standalone/config/supervisord.conf index 29cde45..4646ed8 100644 --- a/novosga-2.2-standalone/config/supervisord.conf +++ b/novosga-2.2-standalone/config/supervisord.conf @@ -30,3 +30,12 @@ stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 autorestart=false startretries=0 + +[program:messenger] +command=consumer.sh +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 +autorestart=false +startretries=0 diff --git a/novosga-2.2-standalone/consumer.sh b/novosga-2.2-standalone/consumer.sh new file mode 100755 index 0000000..f7a1abd --- /dev/null +++ b/novosga-2.2-standalone/consumer.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env sh + +echo "Setting up Messenger transports: async" +php bin/console messenger:setup-transports + +while true +do + echo "Starting Messenger Consumer: async" + php bin/console messenger:consume async -vv --time-limit=3600 + echo "Consumer stopped (time-limit achived)" +done