From e9a3c79fc868ceed0942f5d977e60306e82e1de9 Mon Sep 17 00:00:00 2001 From: Randy Fay Date: Thu, 27 Jul 2023 09:46:15 -0600 Subject: [PATCH] fix: directly expose port on 8036 when router disabled, fixes #3 (#4) --- docker-compose.phpmyadmin-norouter.yaml | 4 ++++ install.yaml | 10 ++++++++++ 2 files changed, 14 insertions(+) create mode 100644 docker-compose.phpmyadmin-norouter.yaml diff --git a/docker-compose.phpmyadmin-norouter.yaml b/docker-compose.phpmyadmin-norouter.yaml new file mode 100644 index 0000000..f369b69 --- /dev/null +++ b/docker-compose.phpmyadmin-norouter.yaml @@ -0,0 +1,4 @@ +#ddev-generated +# If omit_containers[ddev-router] then this file will be replaced +# with another with a `ports` statement to directly expose port 80 to 8036 +services: {} diff --git a/install.yaml b/install.yaml index b1bd1ae..b509454 100644 --- a/install.yaml +++ b/install.yaml @@ -4,4 +4,14 @@ name: phpmyadmin project_files: - docker-compose.phpmyadmin.yaml +- docker-compose.phpmyadmin-norouter.yaml - commands/host/phpmyadmin + +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 + fi +