serving/samples/helloworld-php: use development php.ini (#699)

* serving/samples/helloworld-php: use development php.ini

* serving/samples/helloworld-php: update README
This commit is contained in:
Adam Ross 2019-01-03 15:19:39 -08:00 committed by Knative Prow Robot
parent e801cd1a18
commit 72f1777628
2 changed files with 12 additions and 0 deletions

View File

@ -8,6 +8,12 @@ COPY index.php /var/www/html/
# Use the PORT environment variable in Apache configuration files. # Use the PORT environment variable in Apache configuration files.
RUN sed -i 's/80/${PORT}/g' /etc/apache2/sites-available/000-default.conf /etc/apache2/ports.conf RUN sed -i 's/80/${PORT}/g' /etc/apache2/sites-available/000-default.conf /etc/apache2/ports.conf
# Configure PHP for development.
# Switch to the production php.ini for production operations.
# RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
# https://hub.docker.com/_/php#configuration
RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"
# Configure and document the service HTTP port. # Configure and document the service HTTP port.
ENV PORT 8080 ENV PORT 8080
EXPOSE $PORT EXPOSE $PORT

View File

@ -47,6 +47,12 @@ recreate the source files from this folder.
# Use the PORT environment variable in Apache configuration files. # Use the PORT environment variable in Apache configuration files.
RUN sed -i 's/80/${PORT}/g' /etc/apache2/sites-available/000-default.conf /etc/apache2/ports.conf RUN sed -i 's/80/${PORT}/g' /etc/apache2/sites-available/000-default.conf /etc/apache2/ports.conf
# Configure PHP for development.
# Switch to the production php.ini for production operations.
# RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
# https://hub.docker.com/_/php#configuration
RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"
# Configure and document the service HTTP port. # Configure and document the service HTTP port.
ENV PORT 8080 ENV PORT 8080
EXPOSE $PORT EXPOSE $PORT