Skip to content

Commit

Permalink
Use adminerevo docker image instead of the deprecated adminer image, f…
Browse files Browse the repository at this point in the history
…ixes #27 (#30)

Co-authored-by: Randy Fay <[email protected]>
Co-authored-by: Bill Seremetis <[email protected]>
Co-authored-by: Stanislav Zhuk <[email protected]>
  • Loading branch information
4 people authored Nov 22, 2024
1 parent 38e0b97 commit 7f0a471
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 40 deletions.
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,15 @@

## What is this?

This repository allows you to quickly install Adminer database manager into a [Ddev](https://ddev.readthedocs.io) project using just `ddev get ddev/ddev-adminer`.
This repository allows you to quickly install the [AdminerEvo](https://docs.adminerevo.org/) fork of the [adminer](https://www.adminer.org/) database manager into a [DDEV](https://ddev.readthedocs.io) project using just `ddev add-on get ddev/ddev-adminer`.

Adminer is a full-featured database management tool written in PHP. This service
currently ships the [official adminer container](https://hub.docker.com/_/adminer)
with no _external_ plugins. It contains all official plugins and themes and allows
to easily chose one by editing the `docker-compose.adminer.yaml` file after
installation.

This currently supports:

* MySQL / MariaDB
* PostgreSQL
AdminerEvo works with MySQL, MariaDB, PostgreSQL, SQLite, MS SQL, Oracle, Elasticsearch and MongoDB.

## Installation

Expand All @@ -31,7 +28,7 @@ For earlier versions of DDEV run
ddev get ddev/ddev-adminer
```

Afterwards run `ddev restart`
Afterward run `ddev restart`

Then you can just `ddev adminer` or use `ddev describe` to get the URL (`https://<project>.ddev.site:9101`).

Expand Down
3 changes: 0 additions & 3 deletions adminer/Dockerfile

This file was deleted.

28 changes: 0 additions & 28 deletions adminer/ddev-login.php

This file was deleted.

6 changes: 4 additions & 2 deletions docker-compose.adminer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
services:
adminer:
container_name: ddev-${DDEV_SITENAME}-adminer
build:
context: './adminer'
image: shyim/adminerevo:latest
environment:
# Use the line below to change the adminer theme.
# - ADMINER_DESIGN=nette
- ADMINER_DEFAULT_SERVER=db
- ADMINER_DEFAULT_USER=db
- ADMINER_DEFAULT_PASSWORD=db
- ADMINER_DEFAULT_DB=db
- ADMINER_PLUGINS=tables-filter
- VIRTUAL_HOST=$DDEV_HOSTNAME
- HTTP_EXPOSE=9100:8080
Expand Down
19 changes: 18 additions & 1 deletion install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ name: adminer
project_files:
- docker-compose.adminer.yaml
- docker-compose.adminer_norouter.yaml
- adminer
- commands/host/adminer

pre_install_actions:
Expand All @@ -13,6 +12,24 @@ pre_install_actions:
#ddev-nodisplay
#ddev-description:Checking DDEV version
(ddev debug capabilities | grep corepack >/dev/null) || (echo "Please upgrade DDEV to v1.23+ to use this add-on." && false)
- |
#ddev-nodisplay
#ddev-description:Removing old adminer files
has_old_files=false
for file in "${DDEV_APPROOT}/.ddev/adminer/Dockerfile" "${DDEV_APPROOT}/.ddev/adminer/ddev-login.php"; do
if [ ! -f "${file}" ]; then
continue
fi
if grep -q '#ddev-generated' "${file}"; then
rm -f "${file}"
else
echo "${file} needs to be removed but has been modified by the user. Please check it and remove it"
has_old_files=true
fi
done
if [ "${has_old_files}" = true ]; then
exit 2
fi
post_install_actions:
- |
Expand Down

0 comments on commit 7f0a471

Please sign in to comment.