Merge pull request #2396 from ludo237/master

Add the ability to install ffmpeg on Laravel Horizon container
This commit is contained in:
Shao Yu-Lung (Allen) 2020-01-16 15:06:11 +08:00 committed by GitHub
commit bb7ee22f6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 0 deletions

View File

@ -290,6 +290,9 @@ services:
- INSTALL_CASSANDRA=${PHP_FPM_INSTALL_CASSANDRA}
- INSTALL_PHPREDIS=${LARAVEL_HORIZON_INSTALL_PHPREDIS}
- INSTALL_MONGO=${LARAVEL_HORIZON_INSTALL_MONGO}
- INSTALL_FFMPEG=${LARAVEL_HORIZON_INSTALL_FFMPEG}
- PUID=${PHP_WORKER_PUID}
- PGID=${PHP_WORKER_PGID}
volumes:
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
- ./laravel-horizon/supervisord.d:/etc/supervisord.d

View File

@ -253,6 +253,7 @@ NGINX_SSL_PATH=./nginx/ssl/
LARAVEL_HORIZON_INSTALL_SOCKETS=false
LARAVEL_HORIZON_INSTALL_PHPREDIS=true
LARAVEL_HORIZON_INSTALL_MONGO=false
LARAVEL_HORIZON_INSTALL_FFMPEG=false
### APACHE ################################################

View File

@ -35,6 +35,15 @@ RUN apk --update add wget \
RUN docker-php-ext-install mysqli mbstring pdo pdo_mysql tokenizer xml pcntl
RUN pecl channel-update pecl.php.net && pecl install memcached mcrypt-1.0.1 mongodb && docker-php-ext-enable memcached mongodb
# Add a non-root user to help install ffmpeg:
ARG PUID=1000
ENV PUID ${PUID}
ARG PGID=1000
ENV PGID ${PGID}
RUN addgroup -g ${PGID} laradock && \
adduser -D -G laradock -u ${PUID} laradock
#Install BCMath package:
ARG INSTALL_BCMATH=false
RUN if [ ${INSTALL_BCMATH} = true ]; then \
@ -69,6 +78,12 @@ RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
&& docker-php-ext-enable redis \
;fi
ARG INSTALL_FFMPEG=false
RUN if [ ${INSTALL_FFMPEG} = true ]; then \
# Add ffmpeg to horizon
apk add ffmpeg \
;fi
WORKDIR /usr/src
RUN if [ ${INSTALL_CASSANDRA} = true ]; then \
git clone https://github.com/datastax/php-driver.git \

View File

@ -1,5 +1,6 @@
[program:laravel-horizon]
process_name=%(program_name)s_%(process_num)02d
user=laradock
command=php /var/www/artisan horizon
autostart=true
autorestart=true