a4e78b864a
延长 SendEmailJob 超时并改为超时直接失败,补充重试退避、 失败日志与收件人脱敏,避免 send_email 队列批量超时重试。 新增 MAIL_TIMEOUT 与 QUEUE_RETRY_AFTER 配置,并抽出邮件运行时 配置与 HTML 内容服务,确保 Horizon 常驻进程使用最新邮件配置。 为 Docker、supervisor 与 compose 样例补齐 scheduler 进程,并在 节点管理端开启墙检测托管时立即触发一次检测,保证定时任务持续生效。
44 lines
1.5 KiB
Docker
44 lines
1.5 KiB
Docker
FROM phpswoole/swoole:php8.2-alpine
|
|
|
|
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
|
|
|
|
# Install PHP extensions one by one with lower optimization level for ARM64 compatibility
|
|
RUN CFLAGS="-O0" install-php-extensions pcntl && \
|
|
CFLAGS="-O0 -g0" install-php-extensions bcmath && \
|
|
install-php-extensions zip && \
|
|
install-php-extensions redis && \
|
|
apk --no-cache add shadow sqlite mysql-client mysql-dev mariadb-connector-c git patch supervisor redis caddy && \
|
|
addgroup -S -g 1000 www && adduser -S -G www -u 1000 www && \
|
|
(getent group redis || addgroup -S redis) && \
|
|
(getent passwd redis || adduser -S -G redis -H -h /data redis)
|
|
|
|
WORKDIR /www
|
|
|
|
COPY .docker /
|
|
|
|
COPY . /www
|
|
|
|
COPY .docker/supervisor/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
|
COPY .docker/caddy/Caddyfile /etc/caddy/Caddyfile
|
|
COPY .docker/php/zz-xboard.ini /usr/local/etc/php/conf.d/zz-xboard.ini
|
|
|
|
RUN composer install --no-cache --no-dev --no-security-blocking \
|
|
&& php artisan storage:link \
|
|
&& chown -R www:www /www \
|
|
&& chmod -R 775 /www \
|
|
&& mkdir -p /data \
|
|
&& chown redis:redis /data
|
|
|
|
ENV ENABLE_WEB=true \
|
|
ENABLE_HORIZON=true \
|
|
ENABLE_REDIS=true \
|
|
ENABLE_SCHEDULE=true \
|
|
ENABLE_WS_SERVER=true \
|
|
ENABLE_CADDY=true
|
|
|
|
EXPOSE 7001
|
|
COPY .docker/entrypoint.sh /entrypoint.sh
|
|
RUN chmod +x /entrypoint.sh
|
|
ENTRYPOINT ["/entrypoint.sh"]
|
|
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
|