mirror of
https://github.com/phpmyadmin/docker.git
synced 2026-08-24 10:13:22 -05:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7aa164f6e1 | ||
|
|
c086bcea60 | ||
|
|
885eb78b98 | ||
|
|
686bf94364 | ||
|
|
ade6f52350 | ||
|
|
c29aadee1b | ||
|
|
30857caf5c | ||
|
|
2c92dfa55c | ||
|
|
a576282372 | ||
|
|
c4abbbaa35 | ||
|
|
15e82b23d2 | ||
|
|
ff2edd1f87 | ||
|
|
275b59e3dd | ||
|
|
a18b6e3842 | ||
|
|
524e669ce9 | ||
|
|
8884f19c18 | ||
|
|
1cfae7dbf6 | ||
|
|
24fd978c91 | ||
|
|
77d49d4d88 | ||
|
|
76631a48de | ||
|
|
6f28900cf9 | ||
|
|
3febe28134 | ||
|
|
1bcaeb5fec | ||
|
|
1204bcd696 | ||
|
|
447c731aaa | ||
|
|
69a0e832d9 | ||
|
|
0fb67d3437 | ||
|
|
331c3452f4 | ||
|
|
942a0dd5ff | ||
|
|
c76721ba8b | ||
|
|
554e98df45 | ||
|
|
5646cff98e | ||
|
|
382f9b9489 | ||
|
|
70b6297233 | ||
|
|
6314b17ebd | ||
|
|
63fd59434e | ||
|
|
a2782dd8f6 | ||
|
|
61bc237761 | ||
|
|
6736b49f7a | ||
|
|
b5305971ba | ||
|
|
2ebc458766 | ||
|
|
21b0804166 | ||
|
|
b35554203c | ||
|
|
e5a78047b2 | ||
|
|
a7aa88b4c6 | ||
|
|
b45585ea00 | ||
|
|
5d3536c381 | ||
|
|
24679b0c0b | ||
|
|
f5c3a1b628 | ||
|
|
d79872987d | ||
|
|
ed5d9c5fc9 | ||
|
|
446ed9e0d0 | ||
|
|
4ddc41bc29 | ||
|
|
ec28d93349 | ||
|
|
0ac5c9516c | ||
|
|
a1270dc0d5 | ||
|
|
73ea59e04b | ||
|
|
54a5953b37 | ||
|
|
d07907e15d | ||
|
|
e2f38b46ab | ||
|
|
cbcd23494f | ||
|
|
4432177a0a | ||
|
|
e2052a2066 | ||
|
|
6e3955516f | ||
|
|
29d69f34ad | ||
|
|
ddfe8e2b1c | ||
|
|
facd453fc2 | ||
|
|
b4d05f2604 | ||
|
|
ff50a29234 | ||
|
|
e943ff30d0 | ||
|
|
19a74cb25f | ||
|
|
a9cce1d72c | ||
|
|
4bc799bdb4 | ||
|
|
cc3e874181 | ||
|
|
a4dc5b36cd | ||
|
|
f626ed635b |
+1
-4
@@ -4,7 +4,4 @@ docker-compose.testing.yml
|
||||
README.md
|
||||
LICENSE
|
||||
Makefile
|
||||
world.sql
|
||||
test-docker.sh
|
||||
phpmyadmin_test.py
|
||||
config.test.inc.php
|
||||
testing
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
# Configuration for probot-stale - https://github.com/probot/stale
|
||||
|
||||
# Number of days of inactivity before an Issue or Pull Request becomes stale
|
||||
daysUntilStale: 60
|
||||
# Number of days of inactivity before a stale Issue or Pull Request is closed
|
||||
daysUntilClose: 7
|
||||
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
|
||||
exemptLabels:
|
||||
- pinned
|
||||
- security
|
||||
# Label to use when marking as stale
|
||||
staleLabel: wontfix
|
||||
# Comment to post when marking as stale. Set to `false` to disable
|
||||
markComment: >
|
||||
This issue has been automatically marked as stale because it has not had
|
||||
recent activity. It will be closed if no further activity occurs. Thank you
|
||||
for your contributions.
|
||||
# Comment to post when removing the stale label. Set to `false` to disable
|
||||
unmarkComment: false
|
||||
# Comment to post when closing a stale Issue or Pull Request. Set to `false` to disable
|
||||
closeComment: false
|
||||
# Limit to only `issues` or `pulls`
|
||||
only: pulls
|
||||
+21
-7
@@ -1,31 +1,45 @@
|
||||
dist: trusty
|
||||
|
||||
sudo: required
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
||||
language: python
|
||||
python:
|
||||
- "2.7"
|
||||
|
||||
env:
|
||||
matrix:
|
||||
- DB=mysql:latest
|
||||
- DB=mariadb:latest
|
||||
|
||||
before_install:
|
||||
- docker run --name db_server -e MYSQL_ROOT_PASSWORD=my-secret-pw -d $DB
|
||||
- export TESTSUITE_PASSWORD=`openssl rand -base64 30`
|
||||
- docker run --name db_server -e MYSQL_ROOT_PASSWORD=$TESTSUITE_PASSWORD -d $DB
|
||||
|
||||
install:
|
||||
- pip install mechanize
|
||||
- pip install mechanize html5lib
|
||||
|
||||
script:
|
||||
# Build image
|
||||
- docker build -t phpmyadmin/phpmyadmin .
|
||||
# Test for single database
|
||||
- docker run --name testadmin -d --link db_server:db -p 9090:80 phpmyadmin/phpmyadmin
|
||||
- ./test-docker.sh testadmin 9090
|
||||
- ./testing/test-docker.sh testadmin 9090
|
||||
# Test for single database using env
|
||||
- docker run --name envadmin -d --link db_server:db2 -e PMA_HOST=db2 -p 6060:80 phpmyadmin/phpmyadmin
|
||||
- ./test-docker.sh envadmin 6060
|
||||
- ./testing/test-docker.sh envadmin 6060
|
||||
# Test for arbitrary database
|
||||
- docker run --name arbitraryadmin -d --link db_server:db3 -e PMA_ARBITRARY=1 -p 7070:80 phpmyadmin/phpmyadmin
|
||||
- ./test-docker.sh arbitraryadmin 7070 db3
|
||||
- ./testing/test-docker.sh arbitraryadmin 7070 db3
|
||||
# Test for arbitrary database with user config
|
||||
- docker run --name userconfigadmin -d --link db_server:db3 -v `readlink -f ./config.test.inc.php`:/etc/phpmyadmin/config.user.inc.php -p 7080:80 phpmyadmin/phpmyadmin
|
||||
- ./test-docker.sh userconfigadmin 7080 db3
|
||||
- docker run --name userconfigadmin -d --link db_server:db3 -v `readlink -f ./testing/config.test.inc.php`:/etc/phpmyadmin/config.user.inc.php -p 7080:80 phpmyadmin/phpmyadmin
|
||||
- ./testing/test-docker.sh userconfigadmin 7080 db3
|
||||
# Test docker-compose
|
||||
- docker-compose -f docker-compose.yml -f docker-compose.db.yml up -d
|
||||
- ./testing/test-docker.sh phpmyadmin 8080 db_server
|
||||
- docker-compose stop
|
||||
# Run tests in testing container
|
||||
- docker-compose -f docker-compose.testing.yml up -d phpmyadmin
|
||||
- ./testing/wait-for-testing.sh
|
||||
|
||||
+6
-11
@@ -1,7 +1,7 @@
|
||||
FROM alpine:3.4
|
||||
FROM alpine:3.6
|
||||
|
||||
# Install dependencies
|
||||
RUN apk add --no-cache php5-mysqli php5-xml php5-gd php5-zlib php5-bz2 php5-zip php5-openssl php5-curl php5-opcache php5-json nginx php5-fpm supervisor
|
||||
RUN apk add --no-cache php7-session php7-mysqli php7-mbstring php7-xml php7-gd php7-zlib php7-bz2 php7-zip php7-openssl php7-curl php7-opcache php7-json nginx php7-fpm supervisor
|
||||
|
||||
# Include keyring to verify download
|
||||
COPY phpmyadmin.keyring /
|
||||
@@ -14,7 +14,7 @@ COPY run.sh /run.sh
|
||||
RUN chmod u+rwx /run.sh
|
||||
|
||||
# Calculate download URL
|
||||
ENV VERSION 4.6.5.2
|
||||
ENV VERSION 4.7.7
|
||||
ENV URL https://files.phpmyadmin.net/phpMyAdmin/${VERSION}/phpMyAdmin-${VERSION}-all-languages.tar.gz
|
||||
LABEL version=$VERSION
|
||||
|
||||
@@ -31,19 +31,14 @@ RUN set -x \
|
||||
&& tar xzf phpMyAdmin.tar.gz \
|
||||
&& rm -f phpMyAdmin.tar.gz phpMyAdmin.tar.gz.asc \
|
||||
&& mv phpMyAdmin-$VERSION-all-languages /www \
|
||||
&& mv /www/doc/html /www/htmldoc \
|
||||
&& rm -rf /www/doc \
|
||||
&& mkdir /www/doc \
|
||||
&& mv /www/htmldoc /www/doc/html \
|
||||
&& rm /www/doc/html/.buildinfo /www/doc/html/objects.inv \
|
||||
&& rm -rf /www/js/jquery/src/ /www/js/openlayers/src/ /www/setup/ /www/examples/ /www/test/ /www/po/ /www/templates/test/ /www/phpunit.xml.* /www/build.xml /www/composer.json /www/RELEASE-DATE-$VERSION \
|
||||
&& rm -rf /www/setup/ /www/examples/ /www/test/ /www/po/ /www/composer.json /www/RELEASE-DATE-$VERSION \
|
||||
&& sed -i "s@define('CONFIG_DIR'.*@define('CONFIG_DIR', '/etc/phpmyadmin/');@" /www/libraries/vendor_config.php \
|
||||
&& chown -R root:nobody /www \
|
||||
&& find /www -type d -exec chmod 750 {} \; \
|
||||
&& find /www -type f -exec chmod 640 {} \;
|
||||
|
||||
# Add volume for sessions to allow session persistence
|
||||
VOLUME /sessions
|
||||
# Add directory for sessions to allow session persistence
|
||||
RUN mkdir /sessions
|
||||
|
||||
# We expose phpMyAdmin on port 80
|
||||
EXPOSE 80
|
||||
|
||||
@@ -22,6 +22,17 @@ The official MySQL and MariaDB use following environment variables to define the
|
||||
* `MYSQL_ROOT_PASSWORD` - This variable is mandatory and specifies the password that will be set for the `root` superuser account.
|
||||
* `MYSQL_USER`, `MYSQL_PASSWORD` - These variables are optional, used in conjunction to create a new user and to set that user's password.
|
||||
|
||||
## Docker hub tags
|
||||
|
||||
You can use following tags on Docker hub:
|
||||
|
||||
* `latest` - latest stable release
|
||||
* `4.6` - latest stable release from the 4.6 branch
|
||||
* `4.7` - latest stable release from the 4.7 branch
|
||||
* `edge` - bleeding edge docker image (contains stable phpMyAdmin, but the Docker image changes might not yet be fully tested)
|
||||
* `edge-4.7` - bleeding edge docker image + latest snapshots from 4.7 branch
|
||||
* `edge-4.8` - bleeding edge docker image + latest snapshots from 4.8 branch (currently master)
|
||||
|
||||
## Usage with linked server
|
||||
|
||||
First you need to run MySQL or MariaDB server in Docker, and this image need
|
||||
@@ -45,7 +56,7 @@ docker run --name myadmin -d -e PMA_HOST=dbhost -p 8080:80 phpmyadmin/phpmyadmin
|
||||
You can use arbitrary servers by adding ENV variable `PMA_ARBITRARY=1` to the startup command:
|
||||
|
||||
```
|
||||
docker run --name myadmin -d --link mysql_db_server:db -p 8080:80 -e PMA_ARBITRARY=1 phpmyadmin/phpmyadmin
|
||||
docker run --name myadmin -d -e PMA_ARBITRARY=1 -p 8080:80 phpmyadmin/phpmyadmin
|
||||
```
|
||||
|
||||
## Usage with docker-compose and arbitrary server
|
||||
@@ -59,6 +70,16 @@ Using the docker-compose.yml from https://github.com/phpmyadmin/docker
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
## Run the E2E tests with docker-compose
|
||||
|
||||
You can run the E2E tests with the local test environment by running MariaDB/MySQL databases. Adding ENV variable `PHPMYADMIN_RUN_TEST=true` already added on docker-compose file. Simply run:
|
||||
|
||||
Using the docker-compose.testing.yml from https://github.com/phpmyadmin/docker
|
||||
|
||||
```
|
||||
docker-compose -f docker-compose.testing.yml up phpmyadmin
|
||||
```
|
||||
|
||||
## Adding Custom Configuration
|
||||
|
||||
You can add your own custom config.inc.php settings (such as Configuration Storage setup)
|
||||
@@ -89,6 +110,7 @@ Set the variable ``PMA_ABSOLUTE_URI`` to the fully-qualified path (``https://pma
|
||||
* ``PMA_PORT`` - define port of the MySQL server
|
||||
* ``PMA_HOSTS`` - define comma separated list of address/host names of the MySQL servers
|
||||
* ``PMA_VERBOSES`` - define comma separated list of verbose names of the MySQL servers
|
||||
* ``PMA_PORTS`` - define comma separated list of ports of the MySQL servers
|
||||
* ``PMA_USER`` and ``PMA_PASSWORD`` - define username to use for config authentication method
|
||||
* ``PMA_ABSOLUTE_URI`` - define user-facing URI
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
phpmyadmin:
|
||||
external_links:
|
||||
- db_server:db
|
||||
@@ -1,8 +1,29 @@
|
||||
phpmyadmin:
|
||||
image: phpmyadmin/phpmyadmin:testing
|
||||
container_name: myadmin
|
||||
version: '2'
|
||||
|
||||
services:
|
||||
mariadb:
|
||||
image: mariadb:latest
|
||||
container_name: phpmyadmin_testing_mariadb
|
||||
environment:
|
||||
- PMA_ARBITRARY=1
|
||||
restart: always
|
||||
- MYSQL_ROOT_PASSWORD=test123
|
||||
|
||||
mysql:
|
||||
image: mysql:latest
|
||||
container_name: phpmyadmin_testing_mysql
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=test123
|
||||
|
||||
phpmyadmin:
|
||||
build:
|
||||
context: testing/
|
||||
container_name: phpmyadmin_testing
|
||||
volumes:
|
||||
- /sessions
|
||||
ports:
|
||||
- 8090:80
|
||||
- 8090:80
|
||||
environment:
|
||||
- PMA_ARBITRARY=1
|
||||
- TESTSUITE_PASSWORD=test123
|
||||
depends_on:
|
||||
- mariadb
|
||||
- mysql
|
||||
|
||||
+1
-1
@@ -86,7 +86,7 @@ http {
|
||||
set $path_info $fastcgi_path_info;
|
||||
fastcgi_param PATH_INFO $path_info;
|
||||
|
||||
fastcgi_read_timeout 600;
|
||||
fastcgi_read_timeout 1200;
|
||||
fastcgi_buffering off;
|
||||
|
||||
fastcgi_index index.php;
|
||||
|
||||
+147
-182
@@ -201,10 +201,6 @@ engine = On
|
||||
; http://php.net/short-open-tag
|
||||
short_open_tag = Off
|
||||
|
||||
; Allow ASP-style <% %> tags.
|
||||
; http://php.net/asp-tags
|
||||
asp_tags = Off
|
||||
|
||||
; The number of significant digits displayed in floating point numbers.
|
||||
; http://php.net/precision
|
||||
precision = 14
|
||||
@@ -327,7 +323,7 @@ disable_classes =
|
||||
; be increased on systems where PHP opens many files to reflect the quantity of
|
||||
; the file operations performed.
|
||||
; http://php.net/realpath-cache-size
|
||||
;realpath_cache_size = 16k
|
||||
;realpath_cache_size = 4096k
|
||||
|
||||
; Duration of time, in seconds for which to cache realpath information for a given
|
||||
; file or directory. For systems with rarely changing files, consider increasing this
|
||||
@@ -667,11 +663,10 @@ auto_prepend_file =
|
||||
; http://php.net/auto-append-file
|
||||
auto_append_file =
|
||||
|
||||
; By default, PHP will output a character encoding using
|
||||
; the Content-type: header. To disable sending of the charset, simply
|
||||
; set it to be empty.
|
||||
; By default, PHP will output a media type using the Content-Type header. To
|
||||
; disable this, simply set it to be empty.
|
||||
;
|
||||
; PHP's built-in default is text/html
|
||||
; PHP's built-in default media type is set to text/html.
|
||||
; http://php.net/default-mimetype
|
||||
default_mimetype = "text/html"
|
||||
|
||||
@@ -691,24 +686,16 @@ default_charset = "UTF-8"
|
||||
|
||||
; PHP output character encoding is set to empty.
|
||||
; If empty, default_charset is used.
|
||||
; mbstring or iconv output handler is used.
|
||||
; See also output_buffer.
|
||||
; http://php.net/output-encoding
|
||||
;output_encoding =
|
||||
|
||||
; Always populate the $HTTP_RAW_POST_DATA variable. PHP's default behavior is
|
||||
; to disable this feature and it will be removed in a future version.
|
||||
; If post reading is disabled through enable_post_data_reading,
|
||||
; $HTTP_RAW_POST_DATA is *NOT* populated.
|
||||
; http://php.net/always-populate-raw-post-data
|
||||
always_populate_raw_post_data = -1
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Paths and Directories ;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
; UNIX: "/path1:/path2"
|
||||
;include_path = ".:/usr/share/php"
|
||||
;include_path = ".:/php/includes"
|
||||
;
|
||||
; Windows: "\path1;\path2"
|
||||
;include_path = ".;c:\php\includes"
|
||||
@@ -772,6 +759,11 @@ enable_dl = Off
|
||||
; http://php.net/cgi.fix-pathinfo
|
||||
;cgi.fix_pathinfo=1
|
||||
|
||||
; if cgi.discard_path is enabled, the PHP CGI binary can safely be placed outside
|
||||
; of the web tree and people will not be able to circumvent .htaccess security.
|
||||
; http://php.net/cgi.dicard-path
|
||||
;cgi.discard_path=1
|
||||
|
||||
; FastCGI under IIS (on WINNT based OS) supports the ability to impersonate
|
||||
; security tokens of the calling client. This allows IIS to define the
|
||||
; security context that the request runs under. mod_fastcgi under Apache
|
||||
@@ -792,6 +784,13 @@ enable_dl = Off
|
||||
; http://php.net/cgi.rfc2616-headers
|
||||
;cgi.rfc2616_headers = 0
|
||||
|
||||
; cgi.check_shebang_line controls whether CGI PHP checks for line starting with #!
|
||||
; (shebang) at the top of the running script. This line might be needed if the
|
||||
; script support running both as stand-alone script and via PHP CGI<. PHP in CGI
|
||||
; mode skips this line and ignores its content if this directive is turned on.
|
||||
; http://php.net/cgi.check-shebang-line
|
||||
;cgi.check_shebang_line=1
|
||||
|
||||
;;;;;;;;;;;;;;;;
|
||||
; File Uploads ;
|
||||
;;;;;;;;;;;;;;;;
|
||||
@@ -818,7 +817,7 @@ max_file_uploads = 20
|
||||
|
||||
; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
|
||||
; http://php.net/allow-url-fopen
|
||||
allow_url_fopen = On
|
||||
allow_url_fopen = Off
|
||||
|
||||
; Whether to allow include/require to open URLs (like http:// or ftp://) as files.
|
||||
; http://php.net/allow-url-include
|
||||
@@ -869,6 +868,47 @@ default_socket_timeout = 60
|
||||
; If you only provide the name of the extension, PHP will look for it in its
|
||||
; default extension directory.
|
||||
;
|
||||
; Windows Extensions
|
||||
; Note that ODBC support is built in, so no dll is needed for it.
|
||||
; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5+)
|
||||
; extension folders as well as the separate PECL DLL download (PHP 5+).
|
||||
; Be sure to appropriately set the extension_dir directive.
|
||||
;
|
||||
;extension=php_bz2.dll
|
||||
;extension=php_curl.dll
|
||||
;extension=php_fileinfo.dll
|
||||
;extension=php_ftp.dll
|
||||
;extension=php_gd2.dll
|
||||
;extension=php_gettext.dll
|
||||
;extension=php_gmp.dll
|
||||
;extension=php_intl.dll
|
||||
;extension=php_imap.dll
|
||||
;extension=php_interbase.dll
|
||||
;extension=php_ldap.dll
|
||||
;extension=php_mbstring.dll
|
||||
;extension=php_exif.dll ; Must be after mbstring as it depends on it
|
||||
;extension=php_mysqli.dll
|
||||
;extension=php_oci8_12c.dll ; Use with Oracle Database 12c Instant Client
|
||||
;extension=php_openssl.dll
|
||||
;extension=php_pdo_firebird.dll
|
||||
;extension=php_pdo_mysql.dll
|
||||
;extension=php_pdo_oci.dll
|
||||
;extension=php_pdo_odbc.dll
|
||||
;extension=php_pdo_pgsql.dll
|
||||
;extension=php_pdo_sqlite.dll
|
||||
;extension=php_pgsql.dll
|
||||
;extension=php_shmop.dll
|
||||
|
||||
; The MIBS data available in the PHP distribution must be installed.
|
||||
; See http://www.php.net/manual/en/snmp.installation.php
|
||||
;extension=php_snmp.dll
|
||||
|
||||
;extension=php_soap.dll
|
||||
;extension=php_sockets.dll
|
||||
;extension=php_sqlite3.dll
|
||||
;extension=php_tidy.dll
|
||||
;extension=php_xmlrpc.dll
|
||||
;extension=php_xsl.dll
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;
|
||||
; Module Settings ;
|
||||
@@ -926,10 +966,7 @@ cli_server.color = On
|
||||
; happens within intl functions. The value is the level of the error produced.
|
||||
; Default is 0, which does not produce any errors.
|
||||
;intl.error_level = E_WARNING
|
||||
|
||||
[sqlite]
|
||||
; http://php.net/sqlite.assoc-case
|
||||
;sqlite.assoc_case = 0
|
||||
;intl.use_exceptions = 0
|
||||
|
||||
[sqlite3]
|
||||
;sqlite3.extension_dir =
|
||||
@@ -946,6 +983,10 @@ cli_server.color = On
|
||||
; http://php.net/pcre.recursion-limit
|
||||
;pcre.recursion_limit=100000
|
||||
|
||||
;Enables or disables JIT compilation of patterns. This requires the PCRE
|
||||
;library to be compiled with JIT support.
|
||||
;pcre.jit=1
|
||||
|
||||
[Pdo]
|
||||
; Whether to pool ODBC connections. Can be one of "strict", "relaxed" or "off"
|
||||
; http://php.net/pdo-odbc.connection-pooling
|
||||
@@ -1079,64 +1120,6 @@ ibase.dateformat = "%Y-%m-%d"
|
||||
; Default time format.
|
||||
ibase.timeformat = "%H:%M:%S"
|
||||
|
||||
[MySQL]
|
||||
; Allow accessing, from PHP's perspective, local files with LOAD DATA statements
|
||||
; http://php.net/mysql.allow_local_infile
|
||||
mysql.allow_local_infile = On
|
||||
|
||||
; Allow or prevent persistent links.
|
||||
; http://php.net/mysql.allow-persistent
|
||||
mysql.allow_persistent = On
|
||||
|
||||
; If mysqlnd is used: Number of cache slots for the internal result set cache
|
||||
; http://php.net/mysql.cache_size
|
||||
mysql.cache_size = 2000
|
||||
|
||||
; Maximum number of persistent links. -1 means no limit.
|
||||
; http://php.net/mysql.max-persistent
|
||||
mysql.max_persistent = -1
|
||||
|
||||
; Maximum number of links (persistent + non-persistent). -1 means no limit.
|
||||
; http://php.net/mysql.max-links
|
||||
mysql.max_links = -1
|
||||
|
||||
; Default port number for mysql_connect(). If unset, mysql_connect() will use
|
||||
; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
|
||||
; compile-time value defined MYSQL_PORT (in that order). Win32 will only look
|
||||
; at MYSQL_PORT.
|
||||
; http://php.net/mysql.default-port
|
||||
mysql.default_port =
|
||||
|
||||
; Default socket name for local MySQL connects. If empty, uses the built-in
|
||||
; MySQL defaults.
|
||||
; http://php.net/mysql.default-socket
|
||||
mysql.default_socket =
|
||||
|
||||
; Default host for mysql_connect() (doesn't apply in safe mode).
|
||||
; http://php.net/mysql.default-host
|
||||
mysql.default_host =
|
||||
|
||||
; Default user for mysql_connect() (doesn't apply in safe mode).
|
||||
; http://php.net/mysql.default-user
|
||||
mysql.default_user =
|
||||
|
||||
; Default password for mysql_connect() (doesn't apply in safe mode).
|
||||
; Note that this is generally a *bad* idea to store passwords in this file.
|
||||
; *Any* user with PHP access can run 'echo get_cfg_var("mysql.default_password")
|
||||
; and reveal this password! And of course, any users with read access to this
|
||||
; file will be able to reveal the password as well.
|
||||
; http://php.net/mysql.default-password
|
||||
mysql.default_password =
|
||||
|
||||
; Maximum time (in seconds) for connect timeout. -1 means no limit
|
||||
; http://php.net/mysql.connect-timeout
|
||||
mysql.connect_timeout = 60
|
||||
|
||||
; Trace mode. When trace_mode is active (=On), warnings for table/index scans and
|
||||
; SQL-Errors will be displayed.
|
||||
; http://php.net/mysql.trace-mode
|
||||
mysql.trace_mode = Off
|
||||
|
||||
[MySQLi]
|
||||
|
||||
; Maximum number of persistent links. -1 means no limit.
|
||||
@@ -1201,6 +1184,19 @@ mysqlnd.collect_statistics = On
|
||||
; http://php.net/mysqlnd.collect_memory_statistics
|
||||
mysqlnd.collect_memory_statistics = Off
|
||||
|
||||
; Records communication from all extensions using mysqlnd to the specified log
|
||||
; file.
|
||||
; http://php.net/mysqlnd.debug
|
||||
;mysqlnd.debug =
|
||||
|
||||
; Defines which queries will be logged.
|
||||
; http://php.net/mysqlnd.log_mask
|
||||
;mysqlnd.log_mask = 0
|
||||
|
||||
; Default size of the mysqlnd memory pool, which is used by result sets.
|
||||
; http://php.net/mysqlnd.mempool_default_size
|
||||
;mysqlnd.mempool_default_size = 16000
|
||||
|
||||
; Size of a pre-allocated buffer used when sending commands to MySQL in bytes.
|
||||
; http://php.net/mysqlnd.net_cmd_buffer_size
|
||||
;mysqlnd.net_cmd_buffer_size = 2048
|
||||
@@ -1210,6 +1206,15 @@ mysqlnd.collect_memory_statistics = Off
|
||||
; http://php.net/mysqlnd.net_read_buffer_size
|
||||
;mysqlnd.net_read_buffer_size = 32768
|
||||
|
||||
; Timeout for network requests in seconds.
|
||||
; http://php.net/mysqlnd.net_read_timeout
|
||||
;mysqlnd.net_read_timeout = 31536000
|
||||
|
||||
; SHA-256 Authentication Plugin related. File with the MySQL server public RSA
|
||||
; key.
|
||||
; http://php.net/mysqlnd.sha256_server_public_key
|
||||
;mysqlnd.sha256_server_public_key =
|
||||
|
||||
[OCI8]
|
||||
|
||||
; Connection: Enables privileged connections using external
|
||||
@@ -1291,45 +1296,6 @@ pgsql.ignore_notice = 0
|
||||
; http://php.net/pgsql.log-notice
|
||||
pgsql.log_notice = 0
|
||||
|
||||
[Sybase-CT]
|
||||
; Allow or prevent persistent links.
|
||||
; http://php.net/sybct.allow-persistent
|
||||
sybct.allow_persistent = On
|
||||
|
||||
; Maximum number of persistent links. -1 means no limit.
|
||||
; http://php.net/sybct.max-persistent
|
||||
sybct.max_persistent = -1
|
||||
|
||||
; Maximum number of links (persistent + non-persistent). -1 means no limit.
|
||||
; http://php.net/sybct.max-links
|
||||
sybct.max_links = -1
|
||||
|
||||
; Minimum server message severity to display.
|
||||
; http://php.net/sybct.min-server-severity
|
||||
sybct.min_server_severity = 10
|
||||
|
||||
; Minimum client message severity to display.
|
||||
; http://php.net/sybct.min-client-severity
|
||||
sybct.min_client_severity = 10
|
||||
|
||||
; Set per-context timeout
|
||||
; http://php.net/sybct.timeout
|
||||
;sybct.timeout=
|
||||
|
||||
;sybct.packet_size
|
||||
|
||||
; The maximum time in seconds to wait for a connection attempt to succeed before returning failure.
|
||||
; Default: one minute
|
||||
;sybct.login_timeout=
|
||||
|
||||
; The name of the host you claim to be connecting from, for display by sp_who.
|
||||
; Default: none
|
||||
;sybct.hostname=
|
||||
|
||||
; Allows you to define how often deadlocks are to be retried. -1 means "forever".
|
||||
; Default: 0
|
||||
;sybct.deadlock_retry_count=
|
||||
|
||||
[bcmath]
|
||||
; Number of decimal digits for all bcmath functions.
|
||||
; http://php.net/bcmath.scale
|
||||
@@ -1433,7 +1399,7 @@ session.serialize_handler = php
|
||||
; Development Value: 1
|
||||
; Production Value: 1
|
||||
; http://php.net/session.gc-probability
|
||||
session.gc_probability = 0
|
||||
session.gc_probability = 1
|
||||
|
||||
; Defines the probability that the 'garbage collection' process is started on every
|
||||
; session initialization. The probability is calculated by using the following equation:
|
||||
@@ -1580,64 +1546,31 @@ url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
|
||||
; http://php.net/session.upload-progress.min-freq
|
||||
;session.upload_progress.min_freq = "1"
|
||||
|
||||
[MSSQL]
|
||||
; Allow or prevent persistent links.
|
||||
mssql.allow_persistent = On
|
||||
|
||||
; Maximum number of persistent links. -1 means no limit.
|
||||
mssql.max_persistent = -1
|
||||
|
||||
; Maximum number of links (persistent+non persistent). -1 means no limit.
|
||||
mssql.max_links = -1
|
||||
|
||||
; Minimum error severity to display.
|
||||
mssql.min_error_severity = 10
|
||||
|
||||
; Minimum message severity to display.
|
||||
mssql.min_message_severity = 10
|
||||
|
||||
; Compatibility mode with old versions of PHP 3.0.
|
||||
mssql.compatibility_mode = Off
|
||||
|
||||
; Connect timeout
|
||||
;mssql.connect_timeout = 5
|
||||
|
||||
; Query timeout
|
||||
;mssql.timeout = 60
|
||||
|
||||
; Valid range 0 - 2147483647. Default = 4096.
|
||||
;mssql.textlimit = 4096
|
||||
|
||||
; Valid range 0 - 2147483647. Default = 4096.
|
||||
;mssql.textsize = 4096
|
||||
|
||||
; Limits the number of records in each batch. 0 = all records in one batch.
|
||||
;mssql.batchsize = 0
|
||||
|
||||
; Specify how datetime and datetim4 columns are returned
|
||||
; On => Returns data converted to SQL server settings
|
||||
; Off => Returns values as YYYY-MM-DD hh:mm:ss
|
||||
;mssql.datetimeconvert = On
|
||||
|
||||
; Use NT authentication when connecting to the server
|
||||
mssql.secure_connection = Off
|
||||
|
||||
; Specify max number of processes. -1 = library default
|
||||
; msdlib defaults to 25
|
||||
; FreeTDS defaults to 4096
|
||||
;mssql.max_procs = -1
|
||||
|
||||
; Specify client character set.
|
||||
; If empty or not set the client charset from freetds.conf is used
|
||||
; This is only used when compiled with FreeTDS
|
||||
;mssql.charset = "ISO-8859-1"
|
||||
; Only write session data when session data is changed. Enabled by default.
|
||||
; http://php.net/session.lazy-write
|
||||
;session.lazy_write = On
|
||||
|
||||
[Assertion]
|
||||
; Switch whether to compile assertions at all (to have no overhead at run-time)
|
||||
; -1: Do not compile at all
|
||||
; 0: Jump over assertion at run-time
|
||||
; 1: Execute assertions
|
||||
; Changing from or to a negative value is only possible in php.ini! (For turning assertions on and off at run-time, see assert.active, when zend.assertions = 1)
|
||||
; Default Value: 1
|
||||
; Development Value: 1
|
||||
; Production Value: -1
|
||||
; http://php.net/zend.assertions
|
||||
zend.assertions = -1
|
||||
|
||||
; Assert(expr); active by default.
|
||||
; http://php.net/assert.active
|
||||
;assert.active = On
|
||||
|
||||
; Issue a PHP warning for each failed assertion.
|
||||
; Throw an AssertationException on failed assertions
|
||||
; http://php.net/assert.exception
|
||||
;assert.exception = On
|
||||
|
||||
; Issue a PHP warning for each failed assertion. (Overridden by assert.exception if active)
|
||||
; http://php.net/assert.warning
|
||||
;assert.warning = On
|
||||
|
||||
@@ -1681,7 +1614,7 @@ mssql.secure_connection = Off
|
||||
|
||||
[mbstring]
|
||||
; language for internal character representation.
|
||||
; This affects mb_send_mail() and mbstrig.detect_order.
|
||||
; This affects mb_send_mail() and mbstring.detect_order.
|
||||
; http://php.net/mbstring.language
|
||||
;mbstring.language = Japanese
|
||||
|
||||
@@ -1726,7 +1659,7 @@ mssql.secure_connection = Off
|
||||
; substitute_character used when character cannot be converted
|
||||
; one from another
|
||||
; http://php.net/mbstring.substitute-character
|
||||
;mbstring.substitute_character = none;
|
||||
;mbstring.substitute_character = none
|
||||
|
||||
; overload(replace) single byte functions by mbstring functions.
|
||||
; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(),
|
||||
@@ -1853,7 +1786,7 @@ opcache.enable=1
|
||||
; directory to the script key, thus eliminating possible collisions between
|
||||
; files with the same name (basename). Disabling the directive improves
|
||||
; performance, but may break existing applications.
|
||||
;opcache.use_cwd=1
|
||||
opcache.use_cwd=0
|
||||
|
||||
; When disabled, you must reset the OPcache manually or restart the
|
||||
; webserver for changes to the filesystem to take effect.
|
||||
@@ -1871,13 +1804,9 @@ opcache.validate_timestamps=0
|
||||
; size of the optimized code.
|
||||
opcache.save_comments=0
|
||||
|
||||
; If disabled, PHPDoc comments are not loaded from SHM, so "Doc Comments"
|
||||
; may be always stored (save_comments=1), but not loaded by applications
|
||||
; that don't need them anyway.
|
||||
;opcache.load_comments=1
|
||||
|
||||
; If enabled, a fast shutdown sequence is used for the accelerated code
|
||||
;opcache.fast_shutdown=0
|
||||
; Depending on the used Memory Manager this may cause some incompatibilities.
|
||||
opcache.fast_shutdown=1
|
||||
|
||||
; Allow file existence override (file_exists, etc.) performance feature.
|
||||
;opcache.enable_file_override=0
|
||||
@@ -1925,6 +1854,42 @@ opcache.save_comments=0
|
||||
; Useful for internal debugging only.
|
||||
;opcache.protect_memory=0
|
||||
|
||||
; Allows calling OPcache API functions only from PHP scripts which path is
|
||||
; started from specified string. The default "" means no restriction
|
||||
opcache.restrict_api=/disabled/
|
||||
|
||||
; Mapping base of shared memory segments (for Windows only). All the PHP
|
||||
; processes have to map shared memory into the same address space. This
|
||||
; directive allows to manually fix the "Unable to reattach to base address"
|
||||
; errors.
|
||||
;opcache.mmap_base=
|
||||
|
||||
; Enables and sets the second level cache directory.
|
||||
; It should improve performance when SHM memory is full, at server restart or
|
||||
; SHM reset. The default "" disables file based caching.
|
||||
;opcache.file_cache=
|
||||
|
||||
; Enables or disables opcode caching in shared memory.
|
||||
;opcache.file_cache_only=0
|
||||
|
||||
; Enables or disables checksum validation when script loaded from file cache.
|
||||
;opcache.file_cache_consistency_checks=1
|
||||
|
||||
; Implies opcache.file_cache_only=1 for a certain process that failed to
|
||||
; reattach to the shared memory (for Windows only). Explicitly enabled file
|
||||
; cache is required.
|
||||
;opcache.file_cache_fallback=1
|
||||
|
||||
; Enables or disables copying of PHP code (text segment) into HUGE PAGES.
|
||||
; This should improve performance, but requires appropriate OS configuration.
|
||||
;opcache.huge_code_pages=1
|
||||
|
||||
; Validate cached file permissions.
|
||||
; opcache.validate_permission=0
|
||||
|
||||
; Prevent name collisions in chroot'ed environment.
|
||||
; opcache.validate_root=0
|
||||
|
||||
[curl]
|
||||
; A default value for the CURLOPT_CAINFO option. This is required to be an
|
||||
; absolute path.
|
||||
|
||||
@@ -10,13 +10,15 @@ $vars = array(
|
||||
'PMA_VERBOSE',
|
||||
'PMA_VERBOSES',
|
||||
'PMA_PORT',
|
||||
'PMA_PORTS',
|
||||
'PMA_USER',
|
||||
'PMA_PASSWORD',
|
||||
'PMA_ABSOLUTE_URI'
|
||||
);
|
||||
foreach ($vars as $var) {
|
||||
if (!isset($_ENV[$var]) && getenv($var)) {
|
||||
$_ENV[$var] = getenv($var);
|
||||
$env = getenv($var);
|
||||
if (!isset($_ENV[$var]) && $env !== false) {
|
||||
$_ENV[$var] = $env;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,9 +41,11 @@ $hosts = array('db');
|
||||
if (!empty($_ENV['PMA_HOST'])) {
|
||||
$hosts = array($_ENV['PMA_HOST']);
|
||||
$verbose = array($_ENV['PMA_VERBOSE']);
|
||||
$ports = array($_ENV['PMA_PORT']);
|
||||
} elseif (!empty($_ENV['PMA_HOSTS'])) {
|
||||
$hosts = explode(',', $_ENV['PMA_HOSTS']);
|
||||
$verbose = explode(',', $_ENV['PMA_VERBOSES']);
|
||||
$ports = explode(',', $_ENV['PMA_PORTS']);
|
||||
}
|
||||
|
||||
/* Server settings */
|
||||
@@ -50,20 +54,24 @@ for ($i = 1; isset($hosts[$i - 1]); $i++) {
|
||||
if (isset($verbose[$i - 1])) {
|
||||
$cfg['Servers'][$i]['verbose'] = $verbose[$i - 1];
|
||||
}
|
||||
if (isset($_ENV['PMA_PORT'])) {
|
||||
$cfg['Servers'][$i]['port'] = $_ENV['PMA_PORT'];
|
||||
if (isset($ports[$i - 1])) {
|
||||
$cfg['Servers'][$i]['port'] = $ports[$i - 1];
|
||||
}
|
||||
if (isset($_ENV['PMA_USER'])) {
|
||||
$cfg['Servers'][$i]['auth_type'] = 'config';
|
||||
$cfg['Servers'][$i]['user'] = $_ENV['PMA_USER'];
|
||||
$cfg['Servers'][$i]['password'] = isset($_ENV['PMA_PASSWORD']) ? $_ENV['PMA_PASSWORD'] : null;
|
||||
$cfg['Servers'][$i]['password'] = isset($_ENV['PMA_PASSWORD']) ? $_ENV['PMA_PASSWORD'] : '';
|
||||
} else {
|
||||
$cfg['Servers'][$i]['auth_type'] = 'cookie';
|
||||
}
|
||||
$cfg['Servers'][$i]['connect_type'] = 'tcp';
|
||||
$cfg['Servers'][$i]['compress'] = false;
|
||||
$cfg['Servers'][$i]['AllowNoPassword'] = true;
|
||||
}
|
||||
/*
|
||||
* Revert back to last configured server to make
|
||||
* it easier in config.user.inc.php
|
||||
*/
|
||||
$i--;
|
||||
|
||||
/* Uploads setup */
|
||||
$cfg['UploadDir'] = '';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[program:php-fpm]
|
||||
command=php-fpm --nodaemonize --fpm-config /etc/php-fpm.conf -c /etc/php.ini
|
||||
command=php-fpm7 --nodaemonize --fpm-config /etc/php-fpm.conf -c /etc/php.ini
|
||||
user=nobody
|
||||
autostart=true
|
||||
autorestart=true
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -x
|
||||
|
||||
NAME="$1"
|
||||
PORT="$2"
|
||||
if [ -n "$3" ] ; then
|
||||
SERVER="--server $3"
|
||||
else
|
||||
SERVER=''
|
||||
fi
|
||||
|
||||
URL=http://127.0.0.1:$PORT/
|
||||
|
||||
# Wait for container to start
|
||||
ret=0
|
||||
TIMEOUT=0
|
||||
while ! docker exec "$NAME" ps aux | grep -q nginx ; do
|
||||
echo 'Waiting for start...'
|
||||
sleep 1
|
||||
TIMEOUT=$((TIMEOUT + 1))
|
||||
if [ $TIMEOUT -gt 10 ] ; then
|
||||
echo "Failed to wait!"
|
||||
ret=1
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# Perform tests
|
||||
if [ $ret -eq 0 ] ; then
|
||||
python phpmyadmin_test.py --url "$URL" --username root --password my-secret-pw $SERVER
|
||||
ret=$?
|
||||
fi
|
||||
|
||||
# Show debug output in case of failure
|
||||
if [ $ret -ne 0 ] ; then
|
||||
curl "$URL"
|
||||
docker ps -a
|
||||
docker exec "$NAME" ps faux
|
||||
docker exec "$NAME" cat /var/log/php-fpm.log
|
||||
docker exec "$NAME" cat /var/log/nginx-error.log
|
||||
docker exec "$NAME" cat /var/log/supervisord.log
|
||||
exit $ret
|
||||
fi
|
||||
|
||||
# List processes
|
||||
docker exec "$NAME" ps faux
|
||||
@@ -0,0 +1,10 @@
|
||||
# Testing image for phpMyAdmin
|
||||
|
||||
FROM phpmyadmin/phpmyadmin
|
||||
|
||||
# Install test dependencies
|
||||
RUN apk add --no-cache curl py2-pip
|
||||
RUN pip install mechanize html5lib
|
||||
|
||||
COPY test-mariadb.ini test-mysql.ini /etc/supervisor.d/
|
||||
COPY phpmyadmin_test.py test-docker.sh world.sql /
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
import argparse
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
|
||||
@@ -8,11 +9,16 @@ import mechanize
|
||||
|
||||
def test_content(match, content):
|
||||
if not match in content:
|
||||
print content
|
||||
print(content)
|
||||
raise Exception('{0} not found in content!'.format(match))
|
||||
|
||||
|
||||
def test_phpmyadmin(url, username, password, server=None, sqlfile='world.sql'):
|
||||
def test_phpmyadmin(url, username, password, server=None, sqlfile=None):
|
||||
if sqlfile is None:
|
||||
if os.path.exists('./world.sql'):
|
||||
sqlfile = './world.sql'
|
||||
else:
|
||||
sqlfile = './testing/world.sql'
|
||||
br = mechanize.Browser()
|
||||
|
||||
# Ignore robots.txt
|
||||
@@ -49,10 +55,16 @@ def main():
|
||||
parser.add_argument('--username', required=True)
|
||||
parser.add_argument('--password', required=True)
|
||||
parser.add_argument('--server')
|
||||
parser.add_argument('--sqlfile', default='world.sql')
|
||||
parser.add_argument('--sqlfile', default=None)
|
||||
args = parser.parse_args()
|
||||
|
||||
test_phpmyadmin(args.url, args.username, args.password, args.server, args.sqlfile)
|
||||
test_phpmyadmin(
|
||||
args.url,
|
||||
args.username,
|
||||
args.password,
|
||||
args.server,
|
||||
args.sqlfile
|
||||
)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
Executable
+92
@@ -0,0 +1,92 @@
|
||||
#!/bin/sh
|
||||
|
||||
NAME="$1"
|
||||
|
||||
if [ -n "$2" ] ; then
|
||||
PORT="$2"
|
||||
TESTSUITE_PORT=$2
|
||||
fi
|
||||
|
||||
if [ -n "$3" ] ; then
|
||||
SERVER="--server $3"
|
||||
PMA_HOST=$3
|
||||
else
|
||||
SERVER=''
|
||||
fi
|
||||
|
||||
# Set PHPMyAdmin environment
|
||||
PHPMYADMIN_HOSTNAME=${TESTSUITE_HOSTNAME:=localhost}
|
||||
PHPMYADMIN_PORT=${TESTSUITE_PORT:=80}
|
||||
PHPMYADMIN_URL=http://$PHPMYADMIN_HOSTNAME:$PORT/
|
||||
|
||||
# Color text output
|
||||
GREEN="\033[0;32m"
|
||||
RED="\033[0;31m"
|
||||
NC="\033[0m" # No Color
|
||||
|
||||
ret=0
|
||||
# Check if script is running inside container
|
||||
if [ -f /.dockerenv ] ; then
|
||||
echo "Tests running inside container..."
|
||||
|
||||
# Set database environment
|
||||
PHPMYADMIN_DB_HOSTNAME=${PMA_HOST:=localhost}
|
||||
PHPMYADMIN_DB_PORT=${PMA_PORT:=3306}
|
||||
PHPMYADMIN_DB_URL=http://$PHPMYADMIN_DB_HOSTNAME:$PHPMYADMIN_DB_PORT/
|
||||
|
||||
# Wait for database to start
|
||||
TIMEOUT=0
|
||||
while ! curl "$PHPMYADMIN_DB_URL" &>/dev/null; do
|
||||
echo "Waiting for ${PHPMYADMIN_DB_HOSTNAME} database start..."
|
||||
sleep 10
|
||||
TIMEOUT=$((TIMEOUT + 1))
|
||||
if [ $TIMEOUT -gt 3 ] ; then
|
||||
echo "Failed to connect ${PHPMYADMIN_DB_HOSTNAME} database!"
|
||||
echo "Result of ${PHPMYADMIN_DB_HOSTNAME} tests: ${RED}FAILED${NC}"
|
||||
ret=1
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo "Tests running outside container..."
|
||||
docker ps -a
|
||||
COMMAND_HOST="docker exec ${NAME}"
|
||||
fi
|
||||
|
||||
# Wait for container to start
|
||||
TIMEOUT=0
|
||||
while ! $COMMAND_HOST ps aux | grep -q nginx ; do
|
||||
echo "Waiting for PHPMyAdmin start..."
|
||||
sleep 1
|
||||
TIMEOUT=$((TIMEOUT + 1))
|
||||
if [ $TIMEOUT -gt 10 ] ; then
|
||||
echo "Failed to connect PHPMyAdmin!"
|
||||
echo "Result of ${PHPMYADMIN_DB_HOSTNAME} tests: ${RED}FAILED${NC}"
|
||||
ret=1
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# Perform tests
|
||||
if [ $ret -eq 0 ] ; then
|
||||
if [ -f ./phpmyadmin_test.py ] ; then
|
||||
FILENAME=./phpmyadmin_test.py
|
||||
else
|
||||
FILENAME=./testing/phpmyadmin_test.py
|
||||
fi
|
||||
python $FILENAME --url "$PHPMYADMIN_URL" --username root --password $TESTSUITE_PASSWORD $SERVER
|
||||
ret=$?
|
||||
fi
|
||||
|
||||
# Show debug output in case of failure
|
||||
if [ $ret -ne 0 ] ; then
|
||||
curl "$PHPMYADMIN_URL"
|
||||
$COMMAND_HOST ps faux
|
||||
$COMMAND_HOST cat /var/log/php-fpm.log
|
||||
$COMMAND_HOST cat /var/log/nginx-error.log
|
||||
$COMMAND_HOST cat /var/log/supervisord.log
|
||||
echo "Result of ${PHPMYADMIN_DB_HOSTNAME} tests: ${RED}FAILED${NC}"
|
||||
exit $ret
|
||||
fi
|
||||
|
||||
echo "Result of ${PHPMYADMIN_DB_HOSTNAME} tests: ${GREEN}SUCCESS${NC}"
|
||||
@@ -0,0 +1,11 @@
|
||||
[program:test-mariadb]
|
||||
command=/test-docker.sh test 80 mariadb
|
||||
autostart=true
|
||||
autorestart=false
|
||||
priority=3
|
||||
startretries=1
|
||||
stopwaitsecs=20
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
||||
@@ -0,0 +1,11 @@
|
||||
[program:test-mysql]
|
||||
command=/test-docker.sh test 80 mysql
|
||||
autostart=true
|
||||
autorestart=false
|
||||
priority=3
|
||||
startretries=1
|
||||
stopwaitsecs=20
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
||||
Executable
+32
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Helper script to wait for testing inside container completes
|
||||
# Needs running docker-compose container based on docker-compose.testing.yml
|
||||
|
||||
GREEN="\033[0;32m"
|
||||
RED="\033[0;31m"
|
||||
NC="\033[0m" # No Color
|
||||
|
||||
TIMEOUT=0
|
||||
|
||||
sleep 5
|
||||
|
||||
while [ `docker-compose -f docker-compose.testing.yml logs phpmyadmin | grep -c 'Result of \(mysql\|mariadb\) tests'` -lt 2 ] ; do
|
||||
sleep 1
|
||||
TIMEOUT=$(($TIMEOUT + 1))
|
||||
if [ $TIMEOUT -gt 20 ] ; then
|
||||
docker-compose -f docker-compose.testing.yml logs phpmyadmin
|
||||
echo "${RED}Timeout!${NC}"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
if [ `docker-compose -f docker-compose.testing.yml logs phpmyadmin | grep -c 'Result of \(mysql\|mariadb\) tests.*SUCCESS'` -lt 2 ] ; then
|
||||
docker-compose -f docker-compose.testing.yml logs phpmyadmin
|
||||
echo "${RED}Failed${NC}"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
docker-compose -f docker-compose.testing.yml logs phpmyadmin
|
||||
echo "${GREEN}Success${NC}"
|
||||
exit 0
|
||||
+748
-748
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user