Skip to content

Commit

Permalink
Merge #434 - Enable remoteip mod for Apache
Browse files Browse the repository at this point in the history
  • Loading branch information
williamdes committed Apr 2, 2024
2 parents aa656af + 79a5115 commit 50b7203
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ jobs:
run: sed -i 's/mariadb-admin/mysqladmin/' ./docker-compose.testing-${{ matrix.configuration }}.yml
- name: Build images
working-directory: ./testing/
run: docker-compose -f ./docker-compose/docker-compose.testing-${{ matrix.configuration }}.yml build
run: docker compose -f ./docker-compose/docker-compose.testing-${{ matrix.configuration }}.yml build
- name: Run ${{ matrix.configuration }} tests
working-directory: ./testing/
run: docker-compose -f ./docker-compose/docker-compose.testing-${{ matrix.configuration }}.yml up --build --abort-on-container-exit --exit-code-from=sut
run: docker compose -f ./docker-compose/docker-compose.testing-${{ matrix.configuration }}.yml up --build --abort-on-container-exit --exit-code-from=sut
env:
DB: ${{ matrix.database-image }}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Fix for debian 12 issue (#416) that caused libraries for extensions to be uninstalled
- Add extension `bcmath` for 2nd factor authentication (#415)
- Refactor `update.sh` (#408)
- Enable remoteip mod for Apache (#434)

## [5.2.1] - 2023-02-08

Expand Down
4 changes: 4 additions & 0 deletions Dockerfile-debian.template
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ RUN set -ex; \
| sort -u \
| xargs -rt apt-mark manual; \
\
# start: Apache specific build
a2enmod remoteip; \
# end: Apache specific build
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*; \
ldd "$extdir"/*.so | grep -qzv "=> not found" || (echo "Sanity check failed: missing libraries:"; ldd "$extdir"/*.so | grep " => not found"; exit 1); \
Expand Down
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,24 @@ build-fpm-alpine:
docker build ${DOCKER_FLAGS} -t ${DOCKER_REPO}:testing-fpm-alpine fpm-alpine

run:
docker-compose -f ./testing/docker-compose/docker-compose.testing-default.yml up -d
docker compose -f ./testing/docker-compose/docker-compose.testing-default.yml up -d

testing-%:
docker-compose -p "phpmyadmin_$@" -f ./testing/docker-compose/docker-compose.$@.yml up --build --abort-on-container-exit --exit-code-from=sut
docker-compose -p "phpmyadmin_$@" -f ./testing/docker-compose/docker-compose.$@.yml down
docker compose -p "phpmyadmin_$@" -f ./testing/docker-compose/docker-compose.$@.yml up --build --abort-on-container-exit --exit-code-from=sut
docker compose -p "phpmyadmin_$@" -f ./testing/docker-compose/docker-compose.$@.yml down

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

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

clean: stop rm prune

stop:
docker-compose -f ./testing/docker-compose/docker-compose.testing-default.yml stop
docker compose -f ./testing/docker-compose/docker-compose.testing-default.yml stop

rm:
docker-compose -f ./testing/docker-compose/docker-compose.testing-default.yml rm
docker compose -f ./testing/docker-compose/docker-compose.testing-default.yml rm

prune:
docker rm `docker ps -q -a --filter status=exited`
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ You can use arbitrary servers by adding the environment variable `PMA_ARBITRARY=
docker run --name phpmyadmin -d -e PMA_ARBITRARY=1 -p 8080:80 phpmyadmin:latest
```

## Usage with docker-compose and arbitrary server
## Usage with docker compose and an arbitrary server

This will run phpMyAdmin with the arbitrary server option - allowing you to specify any MySQL/MariaDB
server on the login page.
Expand Down Expand Up @@ -210,7 +210,7 @@ docker run --name phpmyadmin -d -e PMA_PASSWORD_FILE=/run/secrets/db_password.tx
## Run the E2E tests for this docker image

You can run the E2E test suite on a local test environment.
The Requirements are `make`, `docker` and `docker-compose`.
The Requirements are `make`, `docker` and the `docker compose` plugin.

Clone this repository: `https://github.com/phpmyadmin/docker.git`

Expand Down
4 changes: 4 additions & 0 deletions apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ RUN set -ex; \
| sort -u \
| xargs -rt apt-mark manual; \
\
# start: Apache specific build
a2enmod remoteip; \
# end: Apache specific build
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*; \
ldd "$extdir"/*.so | grep -qzv "=> not found" || (echo "Sanity check failed: missing libraries:"; ldd "$extdir"/*.so | grep " => not found"; exit 1); \
Expand Down
1 change: 1 addition & 0 deletions fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ RUN set -ex; \
| sort -u \
| xargs -rt apt-mark manual; \
\
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*; \
ldd "$extdir"/*.so | grep -qzv "=> not found" || (echo "Sanity check failed: missing libraries:"; ldd "$extdir"/*.so | grep " => not found"; exit 1); \
Expand Down
1 change: 1 addition & 0 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ function create_variant() {
cp docker-entrypoint.sh "$variant/docker-entrypoint.sh"
if [ "$variant" != "apache" ]; then
sed -i "/^# start: Apache specific settings$/,/^# end: Apache specific settings$/d" "$variant/docker-entrypoint.sh"
sed -i "/^\s*# start: Apache specific build$/,/^\s*# end: Apache specific build$/d" "$variant/Dockerfile"
fi

# Copy config.inc.php
Expand Down

0 comments on commit 50b7203

Please sign in to comment.