wip: uses supervisord for worker and scheduler
This commit is contained in:
@@ -1,10 +1,40 @@
|
||||
FROM code.caldwell.digital/home/torsearch-base-worker:php8.4-alpine
|
||||
###
|
||||
# This version of Torsearch runs the scheduler, downloader, and worker
|
||||
# in this one container. Each process is managerd by supervisord
|
||||
# and can be configured via environment variables and more
|
||||
# than one of these containers cans till be run.
|
||||
###
|
||||
ARG APP_VERSION="latest"
|
||||
|
||||
ARG APP_VERSION="0.0.0-dev"
|
||||
ENV APP_VERSION="${APP_VERSION}"
|
||||
FROM code.caldwell.digital/home/torsearch-app:${APP_VERSION} AS base_image
|
||||
|
||||
COPY . /app
|
||||
|
||||
ENTRYPOINT [ "php", "/app/bin/console", "messenger:consume", "async" ]
|
||||
FROM alpine:3.22 AS build_stage
|
||||
|
||||
HEALTHCHECK --interval=3s --timeout=3s --retries=10 CMD return 0
|
||||
COPY --from=base_image --chown=1000:1000 /app /app
|
||||
|
||||
RUN apk add --no-cache \
|
||||
curl \
|
||||
nginx \
|
||||
php84 \
|
||||
php84-ctype \
|
||||
php84-curl \
|
||||
php84-dom \
|
||||
php84-fileinfo \
|
||||
php84-fpm \
|
||||
php84-gd \
|
||||
php84-mbstring \
|
||||
php84-mysqli \
|
||||
php84-opcache \
|
||||
php84-openssl \
|
||||
php84-pdo_mysql \
|
||||
php84-tokenizer \
|
||||
supervisor
|
||||
|
||||
RUN ln -s /usr/bin/php84 /usr/bin/php
|
||||
|
||||
COPY docker/worker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||
|
||||
# We start supervisord and supervisord starts
|
||||
# respective service in the configuration file.
|
||||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
|
||||
|
||||
Reference in New Issue
Block a user