wip: frankenphp

This commit is contained in:
2025-05-23 21:55:41 -05:00
parent 794189d70a
commit e85ae5ac95
7 changed files with 53 additions and 68 deletions

View File

@@ -1,5 +1,9 @@
FROM dunglas/frankenphp
ENV SERVER_NAME=":80"
ENV CADDY_GLOBAL_OPTIONS="auto_https off"
ENV APP_RUNTIME="Runtime\\FrankenPhpSymfony\\Runtime"
RUN install-php-extensions \
pdo_mysql \
gd \
@@ -17,8 +21,7 @@ RUN install-php-extensions \
#COPY --chmod=0775 ./bash/entrypoint.sh /usr/local/bin/
#COPY --chmod=0755 ./bash/nginx.conf /etc/nginx/conf.d/site.conf
#COPY --chmod=0755 ./docker/app/supervisord.conf /etc/supervisor/conf.d/async-queue.conf
#HEALTHCHECK --interval=3s --timeout=3s --retries=10 CMD [ "php", "/var/www/bin/console", "startup:status" ]
HEALTHCHECK --interval=3s --timeout=3s --retries=10 CMD [ "php", "/app/bin/console", "startup:status" ]
#
#ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]
#

View File

@@ -16,10 +16,7 @@ services:
build: .
restart: unless-stopped
environment:
SERVER_NAME: ":80"
FRANKENPHP_CONFIG: "worker /app/public/index.php"
CADDY_GLOBAL_OPTIONS: "auto_https off"
APP_RUNTIME: "Runtime\\FrankenPhpSymfony\\Runtime"
volumes:
- $PWD:/app
tty: true
@@ -27,6 +24,14 @@ services:
database:
condition: service_healthy
worker:
build: .
restart: unless-stopped
volumes:
- $PWD:/app
tty: true
command: php /app/bin/console messenger:consume async -vv
redis:
image: redis:latest
volumes:
@@ -34,34 +39,6 @@ services:
command: redis-server --maxmemory 512MB
restart: unless-stopped
# worker:
# build:
# dockerfile: docker/Dockerfile.worker
# context: .
# volumes:
# - ./:/app
# - ./var/downloads/movies:/var/download/movies
# - ./var/downloads/tvshows:/var/download/tvshows
# command: -vvv --time-limit=3600
# env_file:
# - .env
# depends_on:
# app:
# condition: service_healthy
# scheduler:
# build:
# dockerfile: docker/Dockerfile.scheduler
# context: .
# volumes:
# - ./:/var/www
# - ./var/download:/var/download
# command: -vv --time-limit=3600
# depends_on:
# app:
# condition: service_healthy
mercure:
image: dunglas/mercure
restart: unless-stopped

View File

@@ -5,15 +5,6 @@ framework:
transports:
# https://symfony.com/doc/current/messenger.html#transport-configuration
download:
dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
options:
use_notify: true
check_delayed_interval: 60000
retry_strategy:
max_retries: 1
multiplier: 1
async:
dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
options:

View File

@@ -1,20 +1,17 @@
FROM trafex/php-nginx:3.9.0
FROM dunglas/frankenphp
USER root
ENV FRANKENPHP_CONFIG="worker /app/public/index.php"
ENV SERVER_NAME=":80"
ENV CADDY_GLOBAL_OPTIONS="auto_https off"
ENV APP_RUNTIME="Runtime\\FrankenPhpSymfony\\Runtime"
RUN apk add --no-cache \
php84-opcache \
php84-pdo_mysql \
php84-simplexml
RUN install-php-extensions \
pdo_mysql \
gd \
intl \
zip \
opcache
USER nobody
COPY . /app
COPY --chown=nobody:nobody . /var/www
COPY --chmod=0775 ./bash/entrypoint.sh /usr/local/bin/
COPY --chmod=0755 ./bash/nginx.conf /etc/nginx/conf.d/site.conf
HEALTHCHECK --interval=3s --timeout=3s --retries=10 CMD [ "php", "/var/www/bin/console", "startup:status" ]
ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]
WORKDIR /var/www
HEALTHCHECK --interval=3s --timeout=3s --retries=10 CMD [ "php", "/app/bin/console", "startup:status" ]

View File

@@ -1,7 +1,16 @@
FROM php:8.4-cli-alpine3.21
FROM dunglas/frankenphp
RUN docker-php-ext-install pdo_mysql
ENV SERVER_NAME=":80"
ENV CADDY_GLOBAL_OPTIONS="auto_https off"
ENV APP_RUNTIME="Runtime\\FrankenPhpSymfony\\Runtime"
COPY --chown=www-data:www-data . /app
RUN install-php-extensions \
pdo_mysql \
gd \
intl \
zip \
opcache
ENTRYPOINT [ "php", "/app/bin/console", "messenger:consume", "scheduler_monitor" ]
COPY . /app
ENTRYPOINT [ "php", "/app/bin/console", "messenger:consume", "schedule_monitor", "-vv" ]

View File

@@ -1,7 +1,16 @@
FROM php:8.4-cli-alpine3.21
FROM dunglas/frankenphp
RUN docker-php-ext-install pdo_mysql
ENV SERVER_NAME=":80"
ENV CADDY_GLOBAL_OPTIONS="auto_https off"
ENV APP_RUNTIME="Runtime\\FrankenPhpSymfony\\Runtime"
COPY --chown=www-data:www-data . /app
RUN install-php-extensions \
pdo_mysql \
gd \
intl \
zip \
opcache \
ENTRYPOINT [ "php", "/app/bin/console", "messenger:consume", "download" ]
COPY . /app
ENTRYPOINT [ "php", "/app/bin/console", "messenger:consume", "async", "-vv" ]

View File

@@ -27,7 +27,7 @@ services:
volumes:
- /mnt/media/downloads/movies:/var/download/movies
- /mnt/media/downloads/tvshows:/var/download/tvshows
command: -v --time-limit=3600 --limit=10
command: --time-limit=3600 --limit=10
env_file:
- .env
restart: always
@@ -44,7 +44,6 @@ services:
image: code.caldwell.digital/home/torsearch-scheduler:latest
volumes:
- ./downloads:/var/download
command: -vv --time-limit=3600
env_file:
- .env
restart: always