Skip to content

Commit 6517adb

Browse files
committed
Fix #421 - Document PMA_SOCKET and PMA_SOCKETS
1 parent 30db079 commit 6517adb

File tree

4 files changed

+79
-2
lines changed

4 files changed

+79
-2
lines changed

.github/workflows/run-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
database-image: ["mariadb:10.6", "mariadb:10.11", "mariadb:latest", "mysql:5.7", "mysql:latest"]
18-
configuration: ["default", "one-host", "config-mount-dir", "fs-import-export", "different-apache-port"]
18+
configuration: ["default", "one-host", "one-socket-host", "config-mount-dir", "fs-import-export", "different-apache-port"]
1919

2020
steps:
2121
- uses: actions/checkout@v3

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ testing-%:
2222
docker-compose -p "phpmyadmin_$@" -f ./testing/docker-compose/docker-compose.$@.yml up --build --abort-on-container-exit --exit-code-from=sut
2323
docker-compose -p "phpmyadmin_$@" -f ./testing/docker-compose/docker-compose.$@.yml down
2424

25-
run-tests: testing-default testing-one-host testing-config-mount-dir testing-fs-import-export testing-different-apache-port
25+
run-tests: testing-default testing-one-host testing-one-socket-host testing-config-mount-dir testing-fs-import-export testing-different-apache-port
2626

2727
logs:
2828
docker-compose -f ./testing/docker-compose/docker-compose.testing-default.yml logs

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ In order to keep your sessions active between container updates you will need to
167167
* ``PMA_HOSTS`` - define comma separated list of address/host names of the MySQL servers
168168
* ``PMA_VERBOSES`` - define comma separated list of verbose names of the MySQL servers
169169
* ``PMA_PORTS`` - define comma separated list of ports of the MySQL servers
170+
* ``PMA_SOCKET`` - define socket file for the MySQL connection
171+
* ``PMA_SOCKETS`` - define comma separated list of socket files for the MySQL connections
170172
* ``PMA_USER`` and ``PMA_PASSWORD`` - define username and password to use only with the `config` authentication method
171173
* ``PMA_ABSOLUTE_URI`` - the full URL to phpMyAdmin. Sometimes needed when used in a reverse-proxy configuration. Don't set this unless needed. See [documentation](https://docs.phpmyadmin.net/en/latest/config.html#cfg_PmaAbsoluteUri).
172174
* ``PMA_CONFIG_BASE64`` - if set, this option will override the default `config.inc.php` with the base64 decoded contents of the variable
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
version: "3.1"
2+
3+
services:
4+
db_server:
5+
image: ${DB:-mariadb:10.11}
6+
environment:
7+
MARIADB_ROOT_PASSWORD: "${TESTSUITE_PASSWORD:-my-secret-pw}"
8+
healthcheck:
9+
test: ["CMD", "mariadb-admin", "ping", "-uroot", "-p${TESTSUITE_PASSWORD:-my-secret-pw}"]
10+
start_period: 10s
11+
interval: 5s
12+
timeout: 60s
13+
retries: 10
14+
networks:
15+
testing:
16+
aliases:
17+
- phpmyadmin_testing_db
18+
tmpfs:
19+
- /var/lib/mysql:rw,noexec,nosuid,size=300m
20+
volumes:
21+
- db-socket:/run/mysqld/
22+
23+
phpmyadmin:
24+
build:
25+
context: ../../apache
26+
environment:
27+
PMA_SOCKET: /run/mysqld/mysqld.sock
28+
UPLOAD_LIMIT: 123M
29+
MAX_EXECUTION_TIME: 125
30+
HIDE_PHP_VERSION: 1
31+
volumes:
32+
- ../config.user.inc.php:/etc/phpmyadmin/config.user.inc.php:ro
33+
- db-socket:/run/mysqld/
34+
healthcheck:
35+
test: ["CMD", "curl", "-Ss", "http://localhost/robots.txt"]
36+
start_period: 5s
37+
interval: 3s
38+
timeout: 60s
39+
retries: 10
40+
networks:
41+
testing:
42+
aliases:
43+
- phpmyadmin_testing_apache
44+
depends_on:
45+
db_server:
46+
condition: service_healthy
47+
48+
sut:
49+
depends_on:
50+
phpmyadmin:
51+
condition: service_healthy
52+
db_server:
53+
condition: service_healthy
54+
build:
55+
context: ../
56+
command: "/tests/testing/test-docker.sh"
57+
networks:
58+
testing:
59+
environment:
60+
TESTSUITE_HOSTNAME: phpmyadmin_testing_apache
61+
TESTSUITE_PORT: 80
62+
TESTSUITE_PASSWORD: "${TESTSUITE_PASSWORD:-my-secret-pw}"
63+
PMA_HOST: phpmyadmin_testing_db
64+
PMA_PORT: 3306
65+
volumes:
66+
- ../../:/tests:ro
67+
- /var/run/docker.sock:/var/run/docker.sock
68+
working_dir: /tests
69+
70+
networks:
71+
testing:
72+
driver: bridge
73+
74+
volumes:
75+
db-socket:

0 commit comments

Comments
 (0)