Skip to content

Commit

Permalink
Provide basic apache testing for ddev, for #1094 (explicit apache tes…
Browse files Browse the repository at this point in the history
…ts still required) (#1101)

* Complete rework of supervisord config (no more tail process)
* Provide php config for apache and cgi folders
* Change apache output to go to stderr in container
* Fix testing to reflect the use of apache
  • Loading branch information
rfay committed Sep 19, 2018
1 parent 53e4013 commit 02111c5
Show file tree
Hide file tree
Showing 36 changed files with 1,723 additions and 196 deletions.
48 changes: 48 additions & 0 deletions .circleci/config.yml
Expand Up @@ -41,6 +41,48 @@ jobs:
name: ddev tests
no_output_timeout: "40m"

golang_test_apache_fpm:
machine:
image: circleci/classic:201711-01
working_directory: ~/go/src/github.com/drud/ddev
environment:
GOPATH: /home/circleci/go
DDEV_TEST_WEBSERVER_TYPE: apache-fpm
# Experiment with only testing TYPO3 with the apache run.
GOTEST_SHORT: 5
steps:
- attach_workspace:
at: ~/
- run:
command: ./.circleci/circle_vm_setup.sh
name: Circle VM setup - tools, docker, golang
# Now build using the regular ddev-only technique - this results in a fully clean set of executables.
# Run the built-in ddev tests with the executables just built.
- run:
command: make -s test
name: ddev tests
no_output_timeout: "40m"

golang_test_apache_cgi:
machine:
image: circleci/classic:201711-01
working_directory: ~/go/src/github.com/drud/ddev
environment:
GOPATH: /home/circleci/go
DDEV_TEST_WEBSERVER_TYPE: apache-cgi
# Experiment with only testing TYPO3 with the apache run.
GOTEST_SHORT: 5
steps:
- attach_workspace:
at: ~/
- run:
command: ./.circleci/circle_vm_setup.sh
name: Circle VM setup - tools, docker, golang
- run:
command: make -s test
name: ddev tests
no_output_timeout: "40m"

staticrequired:
machine:
image: circleci/classic:201711-01
Expand Down Expand Up @@ -170,6 +212,12 @@ workflows:
- golang_test_nginx_fpm:
requires:
- golang_build
- golang_test_apache_fpm:
requires:
- golang_build
- golang_test_apache_cgi:
requires:
- golang_build
- staticrequired:
requires:
- golang_build
Expand Down
Expand Up @@ -20,7 +20,7 @@
# modules, e.g.
#LogLevel info ssl:warn

ErrorLog ${APACHE_LOG_DIR}/error.log
ErrorLog /dev/stdout
CustomLog ${APACHE_LOG_DIR}/access.log combined

# For most configuration files from conf-available/, which are
Expand Down
2 changes: 1 addition & 1 deletion containers/ddev-webserver/files/etc/apache2/apache2.conf
Expand Up @@ -125,7 +125,7 @@ HostnameLookups Off
# logged here. If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog ${APACHE_LOG_DIR}/error.log
ErrorLog /dev/stdout

#
# LogLevel: Control the severity of messages logged to the error_log.
Expand Down
Expand Up @@ -23,7 +23,7 @@ server {

# Disable sendfile as per https://docs.vagrantup.com/v2/synced-folders/virtualbox.html
sendfile off;
error_log /var/log/nginx/error.log info;
error_log /dev/stdout info;
access_log /var/log/nginx/access.log;

location / {
Expand Down
Expand Up @@ -23,7 +23,7 @@ server {

# Disable sendfile as per https://docs.vagrantup.com/v2/synced-folders/virtualbox.html
sendfile off;
error_log /var/log/nginx/error.log info;
error_log /dev/stdout info;
access_log /var/log/nginx/access.log;

location / {
Expand Down
Expand Up @@ -33,7 +33,7 @@ server {

# Disable sendfile as per https://docs.vagrantup.com/v2/synced-folders/virtualbox.html
sendfile off;
error_log /var/log/nginx/error.log info;
error_log /dev/stdout info;
access_log /var/log/nginx/access.log;

location / {
Expand Down
Expand Up @@ -23,7 +23,7 @@ server {

# Disable sendfile as per https://docs.vagrantup.com/v2/synced-folders/virtualbox.html
sendfile off;
error_log /var/log/nginx/error.log info;
error_log /dev/stdout info;
access_log /var/log/nginx/access.log;

location / {
Expand Down
Expand Up @@ -23,7 +23,7 @@ server {

# Disable sendfile as per https://docs.vagrantup.com/v2/synced-folders/virtualbox.html
sendfile off;
error_log /var/log/nginx/error.log info;
error_log /dev/stdout info;
access_log /var/log/nginx/access.log;

location / {
Expand Down
Expand Up @@ -23,7 +23,7 @@ server {

# Disable sendfile as per https://docs.vagrantup.com/v2/synced-folders/virtualbox.html
sendfile off;
error_log /var/log/nginx/error.log info;
error_log /dev/stdout info;
access_log /var/log/nginx/access.log;

location / {
Expand Down
Expand Up @@ -28,7 +28,7 @@ server {

# Disable sendfile as per https://docs.vagrantup.com/v2/synced-folders/virtualbox.html
sendfile off;
error_log /var/log/nginx/error.log info;
error_log /dev/stdout info;
access_log /var/log/nginx/access.log;

# From wordpress demo global_restrictions.conf
Expand Down
204 changes: 204 additions & 0 deletions containers/ddev-webserver/files/etc/php/5.6/apache2/php.ini
@@ -0,0 +1,204 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; php.ini reference: https://git.php.net/?p=php-src.git;a=blob_plain;f=php.ini-production;hb=refs/heads/PHP-7.0 ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[PHP]
engine = On
short_open_tag = Off
precision = 14
output_buffering = 4096
zlib.output_compression = Off
implicit_flush = Off
unserialize_callback_func =
serialize_precision = 17
disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
disable_classes =
zend.enable_gc = On
expose_php = Off
; Resource Limits ;
max_execution_time = 600
request_terminate_timeout = 0
max_input_time = -1
;max_input_nesting_level = 64
max_input_vars = 1500
memory_limit = 1024M
; Error handling and logging ;
error_reporting = E_ALL
display_errors = On
display_startup_errors = On
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
track_errors = On
;xmlrpc_errors = 0
;xmlrpc_error_number = 0
html_errors = On
; Data Handling ;
variables_order = "EGPCS"
request_order = "GP"
register_argc_argv = Off
auto_globals_jit = On
post_max_size = 100M
auto_prepend_file =
auto_append_file =
default_mimetype = "text/html"
default_charset = "UTF-8"
; Paths and Directories ;
doc_root =
user_dir =
enable_dl = Off
cgi.fix_pathinfo=0
; File Uploads ;
file_uploads = On
upload_max_filesize = 100M
max_file_uploads = 20
; Fopen wrappers ;
allow_url_fopen = On
allow_url_include = Off
default_socket_timeout = 60
;auto_detect_line_endings = Off
; Dynamic Extensions ;
always_populate_raw_post_data = -1

[mbstring]
; Required for drupal6
mbstring.http_output = pass
mbstring.http_input = pass

[CLI Server]
cli_server.color = On

[Date]
date.timezone = America/Denver

[Pdo_mysql]
pdo_mysql.cache_size = 2000
pdo_mysql.default_socket=

[mail function]
SMTP = localhost
smtp_port = 25
mail.add_x_header = On
sendmail_path="/usr/local/bin/mailhog sendmail test@example.org --smtp-addr 127.0.0.1:1025"

[SQL]
sql.safe_mode = Off

[ODBC]
odbc.allow_persistent = On
odbc.check_persistent = On
odbc.max_persistent = -1
odbc.max_links = -1
odbc.defaultlrl = 4096
odbc.defaultbinmode = 1

[Interbase]
ibase.allow_persistent = 1
ibase.max_persistent = -1
ibase.max_links = -1
ibase.timestampformat = "%Y-%m-%d %H:%M:%S"
ibase.dateformat = "%Y-%m-%d"
ibase.timeformat = "%H:%M:%S"

[MySQLi]
mysqli.max_persistent = -1
mysqli.allow_persistent = On
mysqli.max_links = -1
mysqli.cache_size = 2000
mysqli.default_port = 3306
mysqli.default_socket =
mysqli.default_host =
mysqli.default_user =
mysqli.default_pw =
mysqli.reconnect = Off

[mysqlnd]
mysqlnd.collect_statistics = On
mysqlnd.collect_memory_statistics = Off

[PostgreSQL]
pgsql.allow_persistent = On
pgsql.auto_reset_persistent = Off
pgsql.max_persistent = -1
pgsql.max_links = -1
pgsql.ignore_notice = 0
pgsql.log_notice = 0

[bcmath]
bcmath.scale = 0

[Session]
session.save_handler = files
session.use_strict_mode = 0
session.use_cookies = 1
session.use_only_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.cookie_httponly =
session.serialize_handler = php
session.gc_probability = 0
session.gc_divisor = 1000
session.gc_maxlifetime = 1440
session.referer_check =
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
session.hash_function = 0
session.hash_bits_per_character = 5
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"

[Assertion]
zend.assertions = -1

[Tidy]
tidy.clean_output = Off

[soap]
soap.wsdl_cache_enabled=1
soap.wsdl_cache_dir="/tmp"
soap.wsdl_cache_ttl=86400
soap.wsdl_cache_limit = 5


[ldap]
ldap.max_links = -1

[opcache]
opcache.enable=1
opcache.enable_cli=1
opcache.memory_consumption=192
opcache.interned_strings_buffer=16
opcache.max_accelerated_files=20000
;opcache.max_wasted_percentage=5
;opcache.use_cwd=1
opcache.validate_timestamps=1
opcache.revalidate_freq=0
;opcache.revalidate_path=0
;opcache.save_comments=1
opcache.fast_shutdown=1
;opcache.enable_file_override=0
;opcache.optimization_level=0xffffffff
;opcache.inherited_hack=1
;opcache.dups_fix=0
;opcache.blacklist_filename=
;opcache.max_file_size=0
;opcache.consistency_checks=0
;opcache.force_restart_timeout=180
;opcache.error_log=
;opcache.log_verbosity_level=1
;opcache.preferred_memory_model=
;opcache.protect_memory=0
;opcache.restrict_api=
;opcache.mmap_base=
;opcache.file_cache=
;opcache.file_cache_only=0
;opcache.file_cache_consistency_checks=1
;opcache.file_cache_fallback=1
;opcache.huge_code_pages=1
;opcache.validate_permission=0
;opcache.validate_root=0

0 comments on commit 02111c5

Please sign in to comment.