Revived the dashboard.
This commit is contained in:
@@ -73,7 +73,8 @@ STOPSIGNAL SIGTERM
|
||||
|
||||
ENTRYPOINT ["/home/unit/docker-entrypoint.sh"]
|
||||
EXPOSE 9000
|
||||
CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock", "--user", "unit", "--group", "unit"]
|
||||
COPY docker/start_prod.sh /usr/local/bin/start
|
||||
CMD ["/usr/local/bin/start"]
|
||||
|
||||
|
||||
FROM BUILD AS DEVELOP
|
||||
@@ -91,9 +92,9 @@ RUN chmod 755 /home/unit/docker-entrypoint.sh \
|
||||
ENTRYPOINT ["/home/unit/docker-entrypoint.sh"]
|
||||
|
||||
EXPOSE 9000
|
||||
CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock", "--user", "unit", "--group", "unit"]
|
||||
|
||||
|
||||
COPY docker/start_dev.sh /usr/local/bin/start
|
||||
CMD ["/usr/local/bin/start"]
|
||||
|
||||
FROM BUILD AS ARTISAN
|
||||
WORKDIR /var/www/html
|
||||
|
21
app/docker/start_dev.sh
Executable file
21
app/docker/start_dev.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env sh
|
||||
set -e
|
||||
role=${CONTAINER_ROLE:-app}
|
||||
if [ "$role" = "app" ]; then
|
||||
exec unitd --no-daemon --control unix:/var/run/control.unit.sock --user unit --group unit
|
||||
elif [ "$role" = "queue" ]; then
|
||||
echo "Running the queue..."
|
||||
php /var/www/html/artisan queue:work --verbose --sleep=5 --tries=10
|
||||
elif [ "$role" = "websockets" ]; then
|
||||
echo "Running the websockets..."
|
||||
php /var/www/html/artisan reverb:start --port=9000
|
||||
elif [ "$role" = "scheduler" ]; then
|
||||
while [ true ]
|
||||
do
|
||||
php /var/www/html/artisan schedule:run --verbose --no-interaction &
|
||||
sleep 60
|
||||
done
|
||||
else
|
||||
echo "Could not match the container role \"$role\""
|
||||
exit 1
|
||||
fi
|
21
app/docker/start_prod.sh
Executable file
21
app/docker/start_prod.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env sh
|
||||
set -e
|
||||
role=${CONTAINER_ROLE:-app}
|
||||
if [ "$role" = "app" ]; then
|
||||
exec unitd --no-daemon --control unix:/var/run/control.unit.sock --user unit --group unit
|
||||
elif [ "$role" = "queue" ]; then
|
||||
echo "Running the queue..."
|
||||
php /var/www/html/artisan queue:work --verbose --sleep=5 --tries=10 --max-time=3600
|
||||
elif [ "$role" = "websockets" ]; then
|
||||
echo "Running the websockets..."
|
||||
php /var/www/html/artisan reverb:start --port=9000
|
||||
elif [ "$role" = "scheduler" ]; then
|
||||
while [ true ]
|
||||
do
|
||||
php /var/www/html/artisan schedule:run --verbose --no-interaction &
|
||||
sleep 60
|
||||
done
|
||||
else
|
||||
echo "Could not match the container role \"$role\""
|
||||
exit 1
|
||||
fi
|
Reference in New Issue
Block a user