diff --git a/Dockerfile b/Dockerfile index 8918e67..5f44f3a 100755 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,9 @@ RUN apt-get update && apt-get install -y openssh-server libpq-dev unzip git libl RUN useradd -c "Hosting Admin User" -u 1000 -g users -G www-data -d /var/www/html -M lamp RUN sed -e 's/^expose_php = On/expose_php = Off/' /usr/local/etc/php/php.ini-production > /usr/local/etc/php/php.ini -COPY sshd_config.patch /tmp +COPY www.conf /usr/local/etc/php-fpm.d/ + +COPY sshd_config.patch /tmp/ RUN (cd / && patch -p0 ) < /tmp/sshd_config.patch && rm /tmp/sshd_config.patch RUN apt-get update && apt-get install -y msmtp \ @@ -26,7 +28,7 @@ EXPOSE 9000/tcp 22/tcp RUN docker-php-ext-install -j$(nproc) pdo_mysql pdo_pgsql ldap gettext RUN curl https://getcomposer.org/installer|php -- --install-dir=/usr/local/bin --filename=composer -COPY init /sbin +COPY init /sbin/ RUN chmod 550 /sbin/init && chown 0:33 /sbin/init ENTRYPOINT [ "/sbin/init" ] CMD [ "php-fpm" ] diff --git a/www.conf b/www.conf new file mode 100644 index 0000000..77aa955 --- /dev/null +++ b/www.conf @@ -0,0 +1,9 @@ +[www] +group = www-data +listen = 127.0.0.1:9000 +pm = dynamic +pm.max_children = 25 +pm.max_spare_servers = 10 +pm.min_spare_servers = 5 +pm.start_servers = 10 +user = www-data