-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
177 additions
and
0 deletions.
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
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,80 @@ | ||
FROM php:7.4-fpm | ||
|
||
# Install packages | ||
RUN apt-get update \ | ||
&& \ | ||
# apt Debian packages | ||
apt-get install -y \ | ||
apt-utils \ | ||
autoconf \ | ||
ca-certificates \ | ||
curl \ | ||
g++ \ | ||
libonig-dev \ | ||
libbz2-dev \ | ||
libfreetype6-dev \ | ||
libjpeg62-turbo-dev \ | ||
libpng-dev \ | ||
libpq-dev \ | ||
libssl-dev \ | ||
libicu-dev \ | ||
libmagickwand-dev \ | ||
libzip-dev \ | ||
unzip \ | ||
zip \ | ||
&& \ | ||
# pecl PHP extensions | ||
pecl install \ | ||
imagick-3.4.4 \ | ||
redis \ | ||
xdebug-2.9.8 \ | ||
&& \ | ||
# Configure PHP extensions | ||
docker-php-ext-configure \ | ||
gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ \ | ||
&& \ | ||
# Install PHP extensions | ||
docker-php-ext-install \ | ||
bcmath \ | ||
bz2 \ | ||
exif \ | ||
ftp \ | ||
gettext \ | ||
gd \ | ||
iconv \ | ||
intl \ | ||
mbstring \ | ||
opcache \ | ||
pdo \ | ||
shmop \ | ||
sockets \ | ||
sysvmsg \ | ||
sysvsem \ | ||
sysvshm \ | ||
zip \ | ||
&& \ | ||
# Enable PHP extensions | ||
docker-php-ext-enable \ | ||
imagick \ | ||
redis \ | ||
xdebug \ | ||
# Clean apt repo caches that don't need to be part of the image | ||
&& \ | ||
apt-get clean \ | ||
&& \ | ||
# Clean out directories that don't need to be part of the image | ||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
# Append our php.ini overrides to the end of the file | ||
RUN echo "upload_max_filesize = 10M" > /usr/local/etc/php/php.ini && \ | ||
echo "post_max_size = 10M" >> /usr/local/etc/php/php.ini && \ | ||
echo "max_execution_time = 300" >> /usr/local/etc/php/php.ini && \ | ||
echo "memory_limit = 256M" >> /usr/local/etc/php/php.ini && \ | ||
echo "opcache.revalidate_freq = 0" >> /usr/local/etc/php/php.ini && \ | ||
echo "opcache.validate_timestamps = 1" >> /usr/local/etc/php/php.ini | ||
|
||
# Copy the `xdebug.ini` file into place for xdebug | ||
COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini | ||
|
||
# Copy the `zzz-docker.conf` file into place for php-fpm | ||
COPY ./zzz-docker.conf /usr/local/etc/php-fpm.d/zzz-docker.conf |
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,6 @@ | ||
xdebug.default_enable=1 | ||
xdebug.remote_enable=1 | ||
xdebug.remote_port=9003 | ||
xdebug.remote_handler=dbgp | ||
xdebug.remote_host=host.docker.internal | ||
xdebug.remote_autostart=1 |
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,4 @@ | ||
[www] | ||
pm.max_children = 10 | ||
pm.process_idle_timeout = 10s | ||
pm.max_requests = 1000 |
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,76 @@ | ||
FROM php:7.4-fpm | ||
|
||
# Install packages | ||
RUN apt-get update \ | ||
&& \ | ||
# apt Debian packages | ||
apt-get install -y \ | ||
apt-utils \ | ||
autoconf \ | ||
ca-certificates \ | ||
curl \ | ||
g++ \ | ||
libonig-dev \ | ||
libbz2-dev \ | ||
libfreetype6-dev \ | ||
libjpeg62-turbo-dev \ | ||
libpng-dev \ | ||
libpq-dev \ | ||
libssl-dev \ | ||
libicu-dev \ | ||
libmagickwand-dev \ | ||
libzip-dev \ | ||
unzip \ | ||
zip \ | ||
&& \ | ||
# pecl PHP extensions | ||
pecl install \ | ||
imagick-3.4.4 \ | ||
redis \ | ||
&& \ | ||
# Configure PHP extensions | ||
docker-php-ext-configure \ | ||
gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ \ | ||
&& \ | ||
# Install PHP extensions | ||
docker-php-ext-install \ | ||
bcmath \ | ||
bz2 \ | ||
exif \ | ||
ftp \ | ||
gettext \ | ||
gd \ | ||
iconv \ | ||
intl \ | ||
mbstring \ | ||
opcache \ | ||
pdo \ | ||
shmop \ | ||
sockets \ | ||
sysvmsg \ | ||
sysvsem \ | ||
sysvshm \ | ||
zip \ | ||
&& \ | ||
# Enable PHP extensions | ||
docker-php-ext-enable \ | ||
imagick \ | ||
redis \ | ||
# Clean apt repo caches that don't need to be part of the image | ||
&& \ | ||
apt-get clean \ | ||
&& \ | ||
# Clean out directories that don't need to be part of the image | ||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
|
||
# Append our php.ini overrides to the end of the file | ||
RUN echo "upload_max_filesize = 10M" > /usr/local/etc/php/php.ini && \ | ||
echo "post_max_size = 10M" >> /usr/local/etc/php/php.ini && \ | ||
echo "max_execution_time = 300" >> /usr/local/etc/php/php.ini && \ | ||
echo "memory_limit = 256M" >> /usr/local/etc/php/php.ini && \ | ||
echo "opcache.revalidate_freq = 0" >> /usr/local/etc/php/php.ini && \ | ||
echo "opcache.validate_timestamps = 1" >> /usr/local/etc/php/php.ini | ||
|
||
# Copy the `zzz-docker.conf` file into place for php-fpm | ||
COPY ./zzz-docker.conf /usr/local/etc/php-fpm.d/zzz-docker.conf |
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,4 @@ | ||
[www] | ||
pm.max_children = 10 | ||
pm.process_idle_timeout = 10s | ||
pm.max_requests = 1000 |