[TOOLS][DOCKER] Add worker container and script, which handles the queues
This commit is contained in:
parent
5e4ada7b78
commit
0dd4b62ded
|
@ -55,7 +55,25 @@ services:
|
|||
- ./docker/social/install.sh:/var/entrypoint.d/social_install.sh
|
||||
# Main files
|
||||
- .:/var/www/social
|
||||
- /var/www/social/docker
|
||||
- /var/www/social/docker # don't map docker folder
|
||||
env_file:
|
||||
- ./docker/social/social.env
|
||||
- ./docker/db/db.env
|
||||
command: /entrypoint.sh
|
||||
|
||||
worker:
|
||||
build: docker/php
|
||||
restart: always
|
||||
tty: true
|
||||
volumes:
|
||||
# Entrypoint
|
||||
- ./docker/php/entrypoint.sh:/entrypoint.sh
|
||||
- ./docker/db/wait_for_db.sh:/wait_for_db.sh
|
||||
- ./docker/social/install.sh:/var/entrypoint.d/10_social_install.sh
|
||||
- ./docker/social/worker.sh:/var/entrypoint.d/20_social_worker.sh
|
||||
# Main files
|
||||
- .:/var/www/social
|
||||
- /var/www/social/docker # don't map docker folder
|
||||
env_file:
|
||||
- ./docker/social/social.env
|
||||
- ./docker/db/db.env
|
||||
|
|
6
docker/social/worker.sh
Executable file
6
docker/social/worker.sh
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
cd /var/www/social || exit 65
|
||||
while :; do
|
||||
bin/console messenger:consume high low -vv --limit=10 --memory-limit=128M --time-limit=3600
|
||||
done
|
Loading…
Reference in New Issue
Block a user