Skip to content

Commit 440c403

Browse files
authored
fix: make ddev phpmyadmin work again for Gitpod, fixes #15 (#16)
* Fix `ddev phpmyadmin` for Gitpod * Rename to _norouter.yaml
1 parent 4a9fd7c commit 440c403

4 files changed

Lines changed: 19 additions & 9 deletions

File tree

README.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,22 @@
66

77
## What is ddev-phpmyadmin?
88

9-
This add-on provides a phpMyAdmin service for [DDEV](https://github.com/ddev/ddev/).
9+
This add-on provides a phpMyAdmin service for [DDEV](https://github.com/ddev/ddev/).
1010

11-
In DDEV v1.22+ phpMyAdmin will not be provided by default, but can be added with this add-on:
11+
In DDEV v1.22+ phpMyAdmin is not provided by default, but it can be added with this add-on:
1212

13-
`ddev get ddev/ddev-phpmyadmin`
13+
```
14+
ddev get ddev/ddev-phpmyadmin
15+
ddev restart
16+
```
1417

15-
You can run phpMyAdmin easily with the command `ddev phpmyadmin` after installing this add-on.
18+
You can run phpMyAdmin easily with the command after installing this add-on:
19+
20+
```
21+
ddev phpmyadmin
22+
```
23+
24+
> [!TIP]
25+
> For Gitpod: The `ddev phpmyadmin` command can open a blank page in preview mode, open the link in a new browser tab/window to make it work.
1626
1727
**Contributed and maintained by [@rfay](https://github.com/rfay)**

commands/host/phpmyadmin

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
DDEV_PHPMYADMIN_PORT=8036
99
DDEV_PHPMYADMIN_HTTPS_PORT=8037
1010

11-
if [ ${DDEV_PRIMARY_URL%://*} = "https" ]; then
12-
ddev launch $DDEV_PRIMARY_URL:$DDEV_PHPMYADMIN_HTTPS_PORT
13-
else
11+
if [ ${DDEV_PRIMARY_URL%://*} = "http" ] || [ -n "${GITPOD_WORKSPACE_ID:-}" ] || [ "${CODESPACES:-}" = "true" ]; then
1412
ddev launch $DDEV_PRIMARY_URL:$DDEV_PHPMYADMIN_PORT
13+
else
14+
ddev launch $DDEV_PRIMARY_URL:$DDEV_PHPMYADMIN_HTTPS_PORT
1515
fi

install.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: phpmyadmin
44

55
project_files:
66
- docker-compose.phpmyadmin.yaml
7-
- docker-compose.phpmyadmin-norouter.yaml
7+
- docker-compose.phpmyadmin_norouter.yaml
88
- commands/host/phpmyadmin
99

1010
pre_install_actions:
@@ -19,7 +19,7 @@ post_install_actions:
1919
#ddev-description:If router disabled, directly expose port
2020
#
2121
if ( {{ contains "ddev-router" (list .DdevGlobalConfig.omit_containers | toString) }} ); then
22-
printf "#ddev-generated\nservices:\n phpmyadmin:\n ports:\n - 8036:80\n" > docker-compose.phpmyadmin-norouter.yaml
22+
printf "#ddev-generated\nservices:\n phpmyadmin:\n ports:\n - 8036:80\n" > docker-compose.phpmyadmin_norouter.yaml
2323
fi
2424
- |
2525
echo "You can now use 'ddev phpmyadmin' to launch PhpMyAdmin"

0 commit comments

Comments
 (0)