Skip to content

Commit

Permalink
Added configurable PHP options to ./etc/PHP/
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen-cox committed Jul 2, 2017
1 parent 8bc21f3 commit ccf7c83
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 6 deletions.
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ services:
volumes:
- ./sites:/var/www
- apache_logs:/var/log/apache2
- ./etc/PHP/docker.ini:/etc/php/5.6/conf.d/docker.ini

# Database server
db:
Expand Down
16 changes: 16 additions & 0 deletions etc/PHP/docker.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
##
# Docker Drupal Development
#
# Override default PHP options

# Turn on all error reporting
error_reporting = E_ALL
display_errors = On
log_errors = On

# Increase resource limits
max_execution_time = 300
memory_limit = 512M
upload_max_filesize = 32M
post_max_size = 32M
max_input_vars = 10000
6 changes: 3 additions & 3 deletions images/apache2_php5/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Drupal web server container

FROM ddd/apache2
FROM dockerdrupaldev/apache2

LABEL maintainer="[email protected]"
ENV DEBIAN_FRONTEND noninteractive
Expand Down Expand Up @@ -38,10 +38,10 @@ RUN locale-gen en_US.UTF-8 && \
apt-get clean

# Configure PHP
COPY config/php/docker.ini /etc/php/5.6/mods-available/docker.ini
COPY config/php/docker.ini /etc/php/5.6/conf.d/docker.ini
COPY config/php/xdebug.ini /etc/php/5.6/mods-available/xdebug.ini
RUN phpenmod xdebug && \
ln -s /etc/php/5.6/mods-available/docker.ini /etc/php/5.6/apache2/conf.d/90-docker.ini
ln -s /etc/php/5.6/conf.d/docker.ini /etc/php/5.6/apache2/conf.d/90-docker.ini

EXPOSE 80 443

Expand Down
6 changes: 3 additions & 3 deletions images/apache2_php7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Drupal web server container

FROM ddd/apache2
FROM dockerdrupaldev/apache2

LABEL maintainer="[email protected]"
ENV DEBIAN_FRONTEND noninteractive
Expand Down Expand Up @@ -35,12 +35,12 @@ RUN apt-get update && \
apt-get clean

# Configure PHP
COPY config/php/docker.ini /etc/php/7.0/mods-available/docker.ini
COPY config/php/docker.ini /etc/php/7.0/conf.d/docker.ini
COPY config/php/xdebug.ini /etc/php/7.0/mods-available/xdebug.ini
RUN phpenmod imap && \
phpenmod mcrypt && \
phpenmod xdebug && \
ln -s /etc/php/7.0/mods-available/docker.ini /etc/php/7.0/apache2/conf.d/90-docker.ini
ln -s /etc/php/7.0/conf.d/docker.ini /etc/php/7.0/apache2/conf.d/90-docker.ini

EXPOSE 80 443

Expand Down
2 changes: 2 additions & 0 deletions php7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ services:
# Drupal web server with PHP 7
web:
image: dockerdrupaldev/apache2-php7:latest
volumes:
- ./etc/PHP/docker.ini:/etc/php/7.0/conf.d/docker.ini

# CLI development tools with SSH and PHP 7
cli_tools:
Expand Down

0 comments on commit ccf7c83

Please sign in to comment.