Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updates needed for php7.2 #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
19 changes: 10 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
FROM ubuntu:16.04

RUN apt-get update && apt-get install -y \
ca-certificates curl cron git supervisor mysql-client vim unzip \
libxml2-dev mime-support ssmtp \
php7.0-fpm php7.0-curl php7.0-gd php7.0-mysql php7.0-mcrypt php7.0-gmp php7.0-ldap php7.0-zip \
php7.0-bcmath php-pear php-console-table php-apcu php-mongodb php-ssh2 \
apache2 \
--no-install-recommends && apt-get -y upgrade && rm -r /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y python-software-properties software-properties-common \
--no-install-recommends --allow-unauthenticated
RUN add-apt-repository ppa:ondrej/php -y | echo 0
RUN apt-get update && apt-get install -y --allow-unauthenticated --no-install-recommends \
ca-certificates curl cron git supervisor mysql-client vim unzip libxml2-dev mime-support ssmtp \
php7.2-fpm php7.2-curl php7.2-gd php7.2-mysql php7.2-gmp php7.2-ldap php7.2-zip \
php7.2-bcmath php-pear php-console-table php-apcu php-mongodb php-ssh2 \
apache2 && apt-get -y --allow-unauthenticated upgrade && rm -r /var/lib/apt/lists/*

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be better to install the GPG key
Probably use something like: https://gist.github.com/janus57/37b079a383dd0507149bd94fd35053d1


RUN a2enmod ssl rewrite proxy_fcgi headers remoteip

Expand All @@ -29,8 +30,8 @@ ADD https://github.com/kelseyhightower/confd/releases/download/v0.11.0/confd-0.1
RUN chmod +x /usr/local/bin/confd

COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY www.conf /etc/php/7.0/fpm/pool.d/www.conf
COPY php.ini /etc/php/7.0/fpm/php.ini
COPY www.conf /etc/php/7.2/fpm/pool.d/www.conf
COPY php.ini /etc/php/7.2/fpm/php.ini
COPY site.conf /etc/apache2/sites-available/000-default.conf
COPY remoteip.conf /etc/apache2/conf-enabled/remoteip.conf
COPY confd /etc/confd/
Expand Down
6 changes: 3 additions & 3 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ if [[ -n "$LOCAL" && $LOCAL = "true" ]] ; then
/usr/bin/apt-get update && apt-get install -y \
php-xdebug \
--no-install-recommends && rm -r /var/lib/apt/lists/*
cp /root/xdebug-php.ini /etc/php/7.0/fpm/php.ini
cp /root/xdebug-php.ini /etc/php/7.2/fpm/php.ini
/usr/bin/supervisorctl restart php-fpm
fi

Expand Down Expand Up @@ -77,8 +77,8 @@ else
fi

# set permissions on php log
chmod 640 /var/log/php7.0-fpm.log
chown www-data:www-data /var/log/php7.0-fpm.log
chmod 640 /var/log/php7.2-fpm.log
chown www-data:www-data /var/log/php7.2-fpm.log

crontab /root/crons.conf
/usr/bin/supervisorctl restart apache2
Expand Down
2 changes: 1 addition & 1 deletion supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0

[program:php-fpm]
command=/usr/sbin/php-fpm7.0 -F -O
command=/usr/sbin/php-fpm7.2 -F -O
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
stdout_logfile=/dev/stdout
Expand Down