Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ As mentioned, anything not recognized as a built-in command will be used as an a

The aim of this project is simplicity. It includes:

* PHP 7.3
* PHP 7.4
* MySQL 5.7
* Redis ([latest](https://hub.docker.com/_/redis/))
* NodeJS ([latest](https://hub.docker.com/_/node/)), with Yarn & Gulp
Expand Down
28 changes: 14 additions & 14 deletions docker-files/docker/app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,33 @@ RUN echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu bionic main" > /etc/apt
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C300EE8C \
&& apt-get update \
&& apt-get install -y curl zip unzip git supervisor sqlite3 \
&& apt-get install -y nginx php7.3-fpm php7.3-cli \
php7.3-pgsql php7.3-sqlite3 php7.3-gd \
php7.3-curl php7.3-memcached \
php7.3-imap php7.3-mysql php7.3-mbstring \
php7.3-xml php7.3-zip php7.3-bcmath php7.3-soap \
php7.3-intl php7.3-readline php7.3-xdebug \
php7.3-msgpack php7.3-igbinary php7.3-ldap \
&& apt-get install -y nginx php7.4-fpm php7.4-cli \
php7.4-pgsql php7.4-sqlite3 php7.4-gd \
php7.4-curl php7.4-memcached \
php7.4-imap php7.4-mysql php7.4-mbstring \
php7.4-xml php7.4-zip php7.4-bcmath php7.4-soap \
php7.4-intl php7.4-readline php7.4-xdebug \
php7.4-msgpack php7.4-igbinary php7.4-ldap \
php-redis \
&& php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer \
&& mkdir /run/php \
&& apt-get -y autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& sed -i "s/pm\.max_children = .*/pm.max_children = 20/" /etc/php/7.3/fpm/pool.d/www.conf \
&& sed -i "s/pm\.start_servers = .*/pm.start_servers = 10/" /etc/php/7.3/fpm/pool.d/www.conf \
&& sed -i "s/pm\.min_spare_servers = .*/pm.min_spare_servers = 5/" /etc/php/7.3/fpm/pool.d/www.conf \
&& sed -i "s/pm\.max_spare_servers = .*/pm.max_spare_servers = 10/" /etc/php/7.3/fpm/pool.d/www.conf \
&& sed -i "s/pm\.max_children = .*/pm.max_children = 20/" /etc/php/7.4/fpm/pool.d/www.conf \
&& sed -i "s/pm\.start_servers = .*/pm.start_servers = 10/" /etc/php/7.4/fpm/pool.d/www.conf \
&& sed -i "s/pm\.min_spare_servers = .*/pm.min_spare_servers = 5/" /etc/php/7.4/fpm/pool.d/www.conf \
&& sed -i "s/pm\.max_spare_servers = .*/pm.max_spare_servers = 10/" /etc/php/7.4/fpm/pool.d/www.conf \
&& echo "daemon off;" >> /etc/nginx/nginx.conf

RUN ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log

COPY h5bp /etc/nginx/h5bp
COPY default /etc/nginx/sites-available/default
COPY php-fpm.conf /etc/php/7.3/fpm/php-fpm.conf
COPY xdebug.ini /etc/php/7.3/mods-available/xdebug.ini
COPY vessel.ini /etc/php/7.3/fpm/conf.d/99-vessel.ini
COPY php-fpm.conf /etc/php/7.4/fpm/php-fpm.conf
COPY xdebug.ini /etc/php/7.4/mods-available/xdebug.ini
COPY vessel.ini /etc/php/7.4/fpm/conf.d/99-vessel.ini

EXPOSE 80

Expand Down
2 changes: 1 addition & 1 deletion docker-files/docker/app/default
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ server {
location ~ \.php$ {
add_header X-Served-By Vessel;
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
}

error_page 404 /index.php;
Expand Down
4 changes: 2 additions & 2 deletions docker-files/docker/app/php-fpm.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
; Pid file
; Note: the default prefix is /var
; Default Value: none
pid = /run/php/php7.3-fpm.pid
pid = /run/php/php7.4-fpm.pid

; Error log file
; If it's set to "syslog", log is sent to syslogd instead of being written
Expand Down Expand Up @@ -122,7 +122,7 @@ daemonize = no
; Relative path can also be used. They will be prefixed by:
; - the global prefix if it's been set (-p argument)
; - /usr otherwise
include=/etc/php/7.3/fpm/pool.d/*.conf
include=/etc/php/7.4/fpm/pool.d/*.conf

; Clear environment in FPM workers. Prevents arbitrary environment variables from
; reaching FPM worker processes by clearing the environment in workers before env
Expand Down
6 changes: 3 additions & 3 deletions docker-files/docker/app/start-container
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/usr/bin/env bash

# Config /etc/php/7.3/mods-available/xdebug.ini
sed -i "s/xdebug\.remote_host\=.*/xdebug\.remote_host\=$XDEBUG_HOST/g" /etc/php/7.3/mods-available/xdebug.ini
# Config /etc/php/7.4/mods-available/xdebug.ini
sed -i "s/xdebug\.remote_host\=.*/xdebug\.remote_host\=$XDEBUG_HOST/g" /etc/php/7.4/mods-available/xdebug.ini

# Run PHP-FPM as current user
if [ ! -z "$WWWUSER" ]; then
sed -i "s/user\ \=.*/user\ \= $WWWUSER/g" /etc/php/7.3/fpm/pool.d/www.conf
sed -i "s/user\ \=.*/user\ \= $WWWUSER/g" /etc/php/7.4/fpm/pool.d/www.conf

# Set UID of user "vessel"
usermod -u $WWWUSER vessel
Expand Down
2 changes: 1 addition & 1 deletion docker-files/docker/app/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0

[program:php-fpm]
command=php-fpm7.3
command=php-fpm7.4
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
Expand Down