Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use adminerevo docker image instead of the deprecated adminer image, fixes #27 #30

Merged
merged 9 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
M-arcus marked this conversation as resolved.
Show resolved Hide resolved
- 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
stasadev marked this conversation as resolved.
Show resolved Hide resolved
- 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