-
-
Notifications
You must be signed in to change notification settings - Fork 982
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New image "8.0-fpm-develop" available for testing purposes
- Loading branch information
Showing
7 changed files
with
565 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
FROM php:8.0-fpm-buster | ||
MAINTAINER Mark Shust <mark@shust.com> | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
cron \ | ||
default-mysql-client \ | ||
git \ | ||
gzip \ | ||
libbz2-dev \ | ||
libfreetype6-dev \ | ||
libicu-dev \ | ||
libjpeg62-turbo-dev \ | ||
libmcrypt-dev \ | ||
libonig-dev \ | ||
libpng-dev \ | ||
libsodium-dev \ | ||
libxslt1-dev \ | ||
libzip-dev \ | ||
lsof \ | ||
procps \ | ||
vim \ | ||
zip | ||
|
||
RUN docker-php-ext-configure gd --with-freetype --with-jpeg | ||
|
||
RUN docker-php-ext-install \ | ||
bcmath \ | ||
bz2 \ | ||
calendar \ | ||
exif \ | ||
gd \ | ||
gettext \ | ||
intl \ | ||
mbstring \ | ||
mysqli \ | ||
opcache \ | ||
pcntl \ | ||
pdo_mysql \ | ||
soap \ | ||
sockets \ | ||
sodium \ | ||
sysvmsg \ | ||
sysvsem \ | ||
sysvshm \ | ||
xsl \ | ||
zip | ||
|
||
RUN pecl channel-update pecl.php.net \ | ||
&& pecl install xdebug | ||
|
||
RUN docker-php-ext-enable xdebug \ | ||
&& sed -i -e 's/^zend_extension/\;zend_extension/g' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini | ||
|
||
RUN groupadd -g 1000 app \ | ||
&& useradd -g 1000 -u 1000 -d /var/www -s /bin/bash app | ||
|
||
RUN apt-get install -y gnupg \ | ||
&& curl -sL https://deb.nodesource.com/setup_10.x | bash - \ | ||
&& apt-get install -y nodejs \ | ||
&& mkdir /var/www/.config /var/www/.npm \ | ||
&& chown app:app /var/www/.config /var/www/.npm \ | ||
&& npm install -g grunt-cli | ||
|
||
RUN curl -sSLO https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \ | ||
&& chmod +x mhsendmail_linux_amd64 \ | ||
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail | ||
|
||
RUN curl -sS https://getcomposer.org/installer | \ | ||
php -- --1 --install-dir=/usr/local/bin --filename=composer | ||
|
||
RUN curl -s https://packages.blackfire.io/gpg.key | apt-key add - \ | ||
&& echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list \ | ||
&& apt-get update \ | ||
&& apt-get install blackfire-agent blackfire-php | ||
|
||
RUN printf '* *\t* * *\tapp\t%s/usr/local/bin/php /var/www/html/update/cron.php\n' >> /etc/crontab \ | ||
&& printf '* *\t* * *\tapp\t%s/usr/local/bin/php /var/www/html/bin/magento cron:run\n' >> /etc/crontab \ | ||
&& printf '* *\t* * *\tapp\t%s/usr/local/bin/php /var/www/html/bin/magento setup:cron:run\n#\n' >> /etc/crontab | ||
|
||
COPY conf/www.conf /usr/local/etc/php-fpm.d/ | ||
COPY conf/php.ini /usr/local/etc/php/ | ||
COPY conf/php-fpm.conf /usr/local/etc/ | ||
COPY bin/cronstart /usr/local/bin/ | ||
|
||
RUN mkdir -p /etc/nginx/html /var/www/html /sock \ | ||
&& chown -R app:app /etc/nginx /var/www /usr/local/etc/php/conf.d /sock | ||
|
||
USER app:app | ||
|
||
VOLUME /var/www | ||
|
||
WORKDIR /var/www/html | ||
|
||
EXPOSE 9001 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
service cron start | ||
|
||
touch /var/www/html/var/.setup_cronjob_status /var/www/html/var/.update_cronjob_status | ||
chown app:app /var/www/html/var/.setup_cronjob_status /var/www/html/var/.update_cronjob_status | ||
|
||
/usr/bin/crontab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
; This file was initially adapated from the output of: (on PHP 5.6) | ||
; grep -vE '^;|^ *$' /usr/local/etc/php-fpm.conf.default | ||
|
||
[global] | ||
|
||
error_log = /proc/self/fd/2 | ||
daemonize = no | ||
|
||
[www] | ||
|
||
; if we send this to /proc/self/fd/1, it never appears | ||
access.log = /proc/self/fd/2 | ||
|
||
;user = app | ||
;group = app | ||
|
||
listen = /sock/docker.sock | ||
listen.owner = app | ||
listen.group = app | ||
listen.mode = 0660 | ||
|
||
pm = dynamic | ||
pm.max_children = 10 | ||
pm.start_servers = 4 | ||
pm.min_spare_servers = 2 | ||
pm.max_spare_servers = 6 | ||
|
||
clear_env = no | ||
|
||
; Ensure worker stdout and stderr are sent to the main error log. | ||
catch_workers_output = yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
memory_limit = 4G | ||
max_execution_time = 1800 | ||
zlib.output_compression = On | ||
cgi.fix_pathinfo = 0 | ||
date.timezone = UTC | ||
|
||
xdebug.remote_autostart = 1 | ||
xdebug.remote_enable = 1 | ||
xdebug.remote_host = host.docker.internal | ||
xdebug.remote_port = 9001 | ||
xdebug.idekey = PHPSTORM | ||
|
||
upload_max_filesize = 100M | ||
post_max_size = 100M | ||
max_input_vars = 10000 | ||
|
||
sendmail_path = "/usr/local/bin/mhsendmail --smtp-addr=mailhog:1025" |
Oops, something went wrong.