Skip to content

Commit

Permalink
Fix ddev phpmyadmin for Gitpod (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
stasadev authored Oct 3, 2024
1 parent 5ef107c commit dcdd0fc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,4 @@ You can run phpMyAdmin easily with the command after installing this add-on:
ddev phpmyadmin
```

> [!TIP]
> 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.
**Contributed and maintained by [@rfay](https://github.com/rfay)**
7 changes: 6 additions & 1 deletion commands/host/phpmyadmin
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@
DDEV_PHPMYADMIN_PORT=8036
DDEV_PHPMYADMIN_HTTPS_PORT=8037
if [ ${DDEV_PRIMARY_URL%://*} = "http" ] || [ -n "${GITPOD_WORKSPACE_ID:-}" ] || [ "${CODESPACES:-}" = "true" ]; then
ddev launch :$DDEV_PHPMYADMIN_PORT
# Gitpod: "gp preview" opens a blank page for PhpMyAdmin, use "xdg-open" instead
if [ "${OSTYPE:-}" = "linux-gnu" ] && [ -n "${GITPOD_WORKSPACE_ID:-}" ] && [ -z "${DDEV_DEBUG:-}" ]; then
xdg-open "$(DDEV_DEBUG=true ddev launch :$DDEV_PHPMYADMIN_PORT | grep "FULLURL" | awk '{print $2}')"
else
ddev launch :$DDEV_PHPMYADMIN_PORT
fi
else
ddev launch :$DDEV_PHPMYADMIN_HTTPS_PORT
fi

0 comments on commit dcdd0fc

Please sign in to comment.