Skip to content
Snippets Groups Projects
Commit 56e71afb authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

docker-composer: add a supervisor service

parent 81a0bc2c
No related branches found
No related tags found
No related merge requests found
......@@ -352,11 +352,11 @@
},
{
"name": "dbp/relay-core-bundle",
"version": "v0.1.20",
"version": "v0.1.21",
"source": {
"type": "git",
"url": "https://gitlab.tugraz.at/dbp/relay/dbp-relay-core-bundle",
"reference": "94264cb880989d8937749a02826e911dd2b819df"
"reference": "f89f53fa7fe19ed211df68e6f6b8fd682de717dc"
},
"require": {
"api-platform/core": "^2.6.3",
......@@ -412,7 +412,7 @@
"license": [
"AGPL-3.0-or-later"
],
"time": "2021-11-04T11:06:30+00:00"
"time": "2021-11-04T12:09:56+00:00"
},
{
"name": "doctrine/annotations",
......
......@@ -21,6 +21,18 @@ services:
- ./php-fpm/php-ini-overrides.ini:/etc/php/7.3/fpm/conf.d/99-overrides.ini
- ./php-fpm/php-fpm-overrides.conf:/etc/php/7.3/fpm/pool.d/z-overrides.conf
queue-worker:
environment:
- TERM_PROGRAM=Hyper # force colors for the symfony dumper
build:
context: php-fpm
working_dir: /application
entrypoint: sudo supervisord -c /etc/supervisor/conf.d/queue-worker.conf
volumes:
- ./php-fpm/queue-worker.conf:/etc/supervisor/conf.d/queue-worker.conf
- ..:/application
- ./php-fpm/php-ini-overrides.ini:/etc/php/7.3/cli/conf.d/99-overrides.ini
redis:
image: "redis"
......
......@@ -34,6 +34,7 @@ RUN wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
php7.3-gmp \
php7.3-xdebug \
composer \
supervisor \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
......
[supervisord]
# so the process is sync
nodaemon=true
# so we don't write a log file
logfile=/dev/null
logfile_maxbytes=0
# so the log file isn't written to the volume
pidfile=/supervisord.pid
[program:queue-work]
command=php /application/bin/console dbp:relay:core:queue:work "%(program_name)s_%(process_num)02d"
user=user
numprocs=2
startsecs=0
autostart=true
autorestart=true
process_name=%(program_name)s_%(process_num)02d
# to forward stdout/stderr to supervisord
stdout_events_enabled=true
stderr_events_enabled=true
stdout_logfile_maxbytes=0
stderr_logfile_maxbytes=0
stdout_logfile=/dev/stdout
stderr_logfile=/dev/stderr
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment