Skip to content

Commit

Permalink
Merge branch 'release/2.3.13' into craft-webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Sep 26, 2020
2 parents b2ea722 + 605d59b commit b987dc7
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# nystudio107/craft Change Log

## 2.3.13 - 2020.09.25
### Added
* Add `run_queue.sh` keep alive script

## 2.3.12 - 2020.09.25
### Added
* Added a `db-seed` directory, and moved the `seed_db.sql` there
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "craftcms/craft",
"description": "nystudio107 Craft 3.4 CMS scaffolding project",
"version": "2.3.12",
"version": "2.3.13",
"keywords": [
"craft",
"cms",
Expand Down
3 changes: 1 addition & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ services:
links: &php-links
- mariadb
- redis
user: www-data
volumes: &php-volumes
- cpresources:/var/www/project/cms/web/cpresources
- storage:/var/www/project/cms/storage
Expand All @@ -43,7 +42,7 @@ services:
queue:
build:
*php-build
command: php craft queue/listen 10
command: /var/www/project/run_queue.sh
depends_on:
- "php"
env_file:
Expand Down
3 changes: 3 additions & 0 deletions docker-config/php-dev-craft/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ RUN apt-get update \

WORKDIR /var/www/project

COPY ./run_queue.sh .
RUN chmod a+x run_queue.sh

# Create the storage directory and make it writeable by PHP
RUN mkdir -p /var/www/project/cms/storage && \
mkdir -p /var/www/project/cms/storage/runtime && \
Expand Down
20 changes: 20 additions & 0 deletions docker-config/php-dev-craft/run_queue.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

# Run Queue shell script
#
# This shell script runs the Craft CMS queue via `php craft queue/listen`
# It's wrapped in a "keep alive" infinite loop that restarts the command
# (after a 30 second sleep) should it exit unexpectedly for any reason
#
# @author nystudio107
# @copyright Copyright (c) 2020 nystudio107
# @link https://nystudio107.com/
# @license MIT

while true
do
cd /var/www/project/cms
php craft queue/listen 10
echo "-> craft queue/listen will retry in 30 seconds"
sleep 30
done

0 comments on commit b987dc7

Please sign in to comment.