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

fix: make ddev phpmyadmin work again for Gitpod, fixes #15 #16

Merged
merged 2 commits into from
Jul 15, 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
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,22 @@

## What is ddev-phpmyadmin?

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

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

`ddev get ddev/ddev-phpmyadmin`
```
ddev get ddev/ddev-phpmyadmin
ddev restart
```

You can run phpMyAdmin easily with the command `ddev phpmyadmin` after installing this add-on.
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)**
6 changes: 3 additions & 3 deletions commands/host/phpmyadmin
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
DDEV_PHPMYADMIN_PORT=8036
DDEV_PHPMYADMIN_HTTPS_PORT=8037

if [ ${DDEV_PRIMARY_URL%://*} = "https" ]; then
ddev launch $DDEV_PRIMARY_URL:$DDEV_PHPMYADMIN_HTTPS_PORT
else
if [ ${DDEV_PRIMARY_URL%://*} = "http" ] || [ -n "${GITPOD_WORKSPACE_ID:-}" ] || [ "${CODESPACES:-}" = "true" ]; then
ddev launch $DDEV_PRIMARY_URL:$DDEV_PHPMYADMIN_PORT
else
ddev launch $DDEV_PRIMARY_URL:$DDEV_PHPMYADMIN_HTTPS_PORT
fi
4 changes: 2 additions & 2 deletions install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: phpmyadmin

project_files:
- docker-compose.phpmyadmin.yaml
- docker-compose.phpmyadmin-norouter.yaml
- docker-compose.phpmyadmin_norouter.yaml
- commands/host/phpmyadmin

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