Skip to content

Commit 5334bb0

Browse files
committed
Update README.md, add check for db
1 parent 0fb6b0d commit 5334bb0

4 files changed

+56
-30
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88

99
## Manual Testing Instructions
1010

11+
```bash
12+
ddev add-on get https://github.com/<user>/<repo>/tarball/<branch>
13+
ddev restart
14+
```
15+
1116
## Automated Testing Overview
1217

1318
<!-- Please describe the tests introduced by this PR, or explain why no tests are needed. -->

README.md

+38-23
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,32 @@
1-
[![tests](https://github.com/ddev/ddev-adminer/actions/workflows/tests.yml/badge.svg)](https://github.com/ddev/ddev-adminer/actions/workflows/tests.yml) ![project is maintained](https://img.shields.io/maintenance/yes/2025.svg)
1+
[![tests](https://github.com/ddev/ddev-adminer/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/ddev/ddev-adminer/actions/workflows/tests.yml?query=branch%3Amain)
2+
[![project is maintained](https://img.shields.io/maintenance/yes/2025.svg)](https://github.com/ddev/ddev-adminer/commits)
3+
[![release](https://img.shields.io/github/v/release/ddev/ddev-adminer)](https://github.com/ddev/ddev-adminer/releases/latest)
24

3-
# DDEV Adminer Service
5+
# DDEV Adminer
46

5-
## What is this?
7+
## Overview
68

7-
This repository allows you to quickly install 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`.
9+
[Adminer](https://www.adminer.org/) is a full-featured database management tool written in PHP.
810

9-
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.
11+
This add-on integrates Adminer into your [DDEV](https://ddev.com/) project.
1012

1113
Adminer works with MySQL, MariaDB, PostgreSQL, SQLite, MS SQL, Oracle, and MongoDB.
1214

1315
## Installation
1416

1517
```sh
16-
ddev add-on get ddev/ddev-adminer && ddev restart
18+
ddev add-on get ddev/ddev-adminer
19+
ddev restart
1720
```
1821

19-
Then you can just `ddev adminer` or use `ddev describe` to get the URL (`https://<project>.ddev.site:9101`).
22+
After installation, make sure to commit the `.ddev` directory to version control.
23+
24+
## Usage
25+
26+
| Command | Description |
27+
| ------- | ----------- |
28+
| `ddev adminer` | Open Adminer in your browser (`https://<project>.ddev.site:9101`) |
29+
| `ddev describe` | View service status and used ports for Adminer |
2030

2131
## Advanced Customization
2232

@@ -25,32 +35,37 @@ To change the design:
2535
```sh
2636
# design: https://www.adminer.org/en/#extras
2737
ddev dotenv set .ddev/.env.adminer --adminer-design=dracula
28-
git add .ddev/.env.adminer
29-
ddev add-on get ddev/ddev-adminer && ddev restart
38+
ddev add-on get ddev/ddev-adminer
39+
ddev restart
3040
```
3141

42+
Make sure to commit the `.ddev/.env.adminer` file to version control.
43+
3244
To add more plugins:
3345

3446
```sh
3547
# plugins: https://www.adminer.org/en/plugins/
3648
ddev dotenv set .ddev/.env.adminer --adminer-plugins="tables-filter edit-calendar"
37-
git add .ddev/.env.adminer
38-
ddev add-on get ddev/ddev-adminer && ddev restart
49+
ddev add-on get ddev/ddev-adminer
50+
ddev restart
3951
```
4052

41-
All possible customization options are listed below (avoid using them if you're unsure):
53+
Make sure to commit the `.ddev/.env.adminer` file to version control.
54+
55+
All customization options (use with caution):
4256

43-
- `--adminer-design`
44-
- `--adminer-docker-image`
45-
- `--adminer-default-driver`
46-
- `--adminer-default-db`
47-
- `--adminer-default-username`
48-
- `--adminer-default-password`
49-
- `--adminer-plugins`
57+
| Variable | Flag | Default |
58+
| -------- | ---- | ------- |
59+
| `ADMINER_DEFAULT_DB` | `--adminer-default-db` | `db` |
60+
| `ADMINER_DEFAULT_DRIVER` | `--adminer-default-driver` | `server` |
61+
| `ADMINER_DEFAULT_PASSWORD` | `--adminer-default-password` | `db` |
62+
| `ADMINER_DEFAULT_USERNAME` | `--adminer-default-username` | `db` |
63+
| `ADMINER_DESIGN` | `--adminer-design` | `` |
64+
| `ADMINER_DOCKER_IMAGE` | `--adminer-docker-image` | `adminer:standalone` |
65+
| `ADMINER_PLUGINS` | `--adminer-plugins` | `tables-filter` |
5066

51-
## What does this add-on do?
67+
## Credits
5268

53-
* Adds the adminer container as a service
69+
Contributed by [@bserem](https://github.com/bserem).
5470

55-
**Contributed by [@bserem](https://github.com/bserem).**
56-
**Maintained by DDEV team.**
71+
Maintained by the [DDEV team](https://ddev.com/support-ddev/).

docker-compose.adminer_norouter.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#ddev-generated
22
# If omit_containers[ddev-router] then this file will be replaced
3-
# with another with a `ports` statement to directly expose port 8080 to 9100
3+
# with another with a 'ports' statement to directly expose port 8080 to 9100
44
services: {}

install.yaml

+12-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
name: adminer
22

3-
# list of files and directories listed that are copied into project .ddev directory
43
project_files:
5-
- docker-compose.adminer.yaml
6-
- docker-compose.adminer_norouter.yaml
7-
- commands/host/adminer
8-
9-
ddev_version_constraint: '>= v1.24.2'
4+
- docker-compose.adminer.yaml
5+
- docker-compose.adminer_norouter.yaml
6+
- commands/host/adminer
107

118
pre_install_actions:
129
- |
@@ -27,6 +24,15 @@ pre_install_actions:
2724
if [ "${has_old_files}" = true ]; then
2825
exit 2
2926
fi
27+
- |
28+
#ddev-nodisplay
29+
#ddev-description:Check for db service
30+
if ddev debug configyaml 2>/dev/null | grep omit_containers | grep -q db; then
31+
echo "Unable to install the add-on because no db service was found"
32+
exit 3
33+
fi
34+
35+
ddev_version_constraint: '>= v1.24.3'
3036

3137
post_install_actions:
3238
- |

0 commit comments

Comments
 (0)