php-worker: add laradock user (#1928)

This commit is contained in:
Lan Phan 2019-01-09 22:54:32 +07:00 committed by Shao Yu-Lung (Allen)
parent 7c4f6dd7a9
commit 03ff791e17
4 changed files with 14 additions and 0 deletions

View File

@ -189,6 +189,8 @@ services:
- INSTALL_BCMATH=${PHP_WORKER_INSTALL_BCMATH} - INSTALL_BCMATH=${PHP_WORKER_INSTALL_BCMATH}
- INSTALL_SOAP=${PHP_WORKER_INSTALL_SOAP} - INSTALL_SOAP=${PHP_WORKER_INSTALL_SOAP}
- INSTALL_ZIP_ARCHIVE=${PHP_WORKER_INSTALL_ZIP_ARCHIVE} - INSTALL_ZIP_ARCHIVE=${PHP_WORKER_INSTALL_ZIP_ARCHIVE}
- PUID=${PHP_WORKER_PUID}
- PGID=${PHP_WORKER_PGID}
volumes: volumes:
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER} - ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
- ./php-worker/supervisord.d:/etc/supervisord.d - ./php-worker/supervisord.d:/etc/supervisord.d

View File

@ -172,6 +172,8 @@ PHP_WORKER_INSTALL_PGSQL=false
PHP_WORKER_INSTALL_BCMATH=false PHP_WORKER_INSTALL_BCMATH=false
PHP_WORKER_INSTALL_SOAP=false PHP_WORKER_INSTALL_SOAP=false
PHP_WORKER_INSTALL_ZIP_ARCHIVE=false PHP_WORKER_INSTALL_ZIP_ARCHIVE=false
PHP_WORKER_PUID=1000
PHP_WORKER_PGID=1000
### NGINX ################################################# ### NGINX #################################################

View File

@ -25,6 +25,15 @@ RUN apk --update add wget \
RUN docker-php-ext-install mysqli mbstring pdo pdo_mysql tokenizer xml pcntl 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 && docker-php-ext-enable memcached RUN pecl channel-update pecl.php.net && pecl install memcached mcrypt-1.0.1 && docker-php-ext-enable memcached
# Add a non-root user:
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 SOAP package: #Install SOAP package:
ARG INSTALL_SOAP=false ARG INSTALL_SOAP=false
RUN if [ ${INSTALL_SOAP} = true ]; then \ RUN if [ ${INSTALL_SOAP} = true ]; then \

View File

@ -4,4 +4,5 @@ command=php /var/www/artisan queue:work --sleep=3 --tries=3 --daemon
autostart=true autostart=true
autorestart=true autorestart=true
numprocs=8 numprocs=8
user=laradock
redirect_stderr=true redirect_stderr=true