Refactoring
This commit is contained in:
1 parent
085ab7e9b8
commit
411f7be896
29 files changed
+219
-50
No files matched your search
+5
-15
@@ -4,8 +4,6 @@ FROM php:8.4-fpm-alpine
|
||||
ENV APP_ROOT="/var/www/html"
|
||||
|
||||
ENV TZ="Europe/Prague" \
|
||||
ENABLE_CRON=0 \
|
||||
ENABLE_SUPERVISOR=0 \
|
||||
COMPOSER_ALLOW_SUPERUSER=1 \
|
||||
PHP_OPCACHE_ENABLE=1 \
|
||||
PHP_OPCACHE_VALIDATE_TIMESTAMPS=0 \
|
||||
@@ -107,20 +105,12 @@ RUN { \
|
||||
echo "opcache.save_comments=1"; \
|
||||
} > "$PHP_INI_DIR/conf.d/10-opcache.ini"
|
||||
|
||||
# Supervisor (queue workers, started when ENABLE_SUPERVISOR=1)
|
||||
# Supervisor (queue workers + scheduler, started from entrypoint.d/90-supervisord.sh)
|
||||
RUN mkdir -p /var/log/supervisor
|
||||
COPY ./supervisor/supervisord.conf /etc/supervisor/supervisord.conf
|
||||
COPY ./supervisor/conf.d/laravel-queues.conf /etc/supervisor/conf.d/laravel-queues.conf
|
||||
COPY ./supervisor.d/ /etc/supervisor/conf.d/
|
||||
|
||||
# Cron (Laravel scheduler, started when ENABLE_CRON=1)
|
||||
RUN mkdir -p /var/log/cron && \
|
||||
echo "* * * * * cd ${APP_ROOT} && /usr/local/bin/php artisan schedule:run >> /dev/null 2>&1" > /etc/crontabs/www-data
|
||||
|
||||
# Entrypoint
|
||||
COPY ./docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
|
||||
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
||||
# Entrypoint scripts (run in order from the stock entrypoint)
|
||||
COPY --chmod=755 ./entrypoint.d/ /etc/entrypoint.d/
|
||||
RUN sed -i 's#^exec #for f in /etc/entrypoint.d/*.sh; do if [ -x "$f" ]; then "$f" || { echo "entrypoint script failed: $f" >\&2; exit 1; }; fi; done\n\nexec #' /usr/local/bin/docker-php-entrypoint
|
||||
|
||||
WORKDIR ${APP_ROOT}
|
||||
|
||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||
CMD ["php-fpm"]
|
||||
Reference in new issue
Block a user