@@ -69,10 +69,8 @@ services:
     image: {{ .router_image }}:{{ .router_tag }}
     container_name: nginx-proxy
     ports:
-      - "80:80"
-      - {{ .mailhogport }}:{{ .mailhogport }}
-      - {{ .dbaport }}:{{ .dbaport }}
-      - {{ .dbport }}:{{ .dbport }}
+      {{ range $port := .ports }}- "{{ $port }}:{{ $port }}"
+      {{ end }}
     volumes:
       - /var/run/docker.sock:/tmp/docker.sock:ro
 networks:
package platform

// SequelproTemplate is the template for Sequelpro config.
var SequelproTemplate = `<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>ContentFilters</key>
    <dict/>
    <key>auto_connect</key>
    <true/>
    <key>data</key>
    <dict>
        <key>connection</key>
        <dict>
            <key>database</key>
            <string>%s</string>
            <key>host</key>
            <string>%s</string>
            <key>name</key>
            <string>drud/%s</string>
            <key>password</key>
            <string>%s</string>
            <key>port</key>
            <integer>%s</integer>
            <key>rdbms_type</key>
            <string>mysql</string>
            <key>sslCACertFileLocation</key>
            <string></string>
            <key>sslCACertFileLocationEnabled</key>
            <integer>0</integer>
            <key>sslCertificateFileLocation</key>
            <string></string>
            <key>sslCertificateFileLocationEnabled</key>
            <integer>0</integer>
            <key>sslKeyFileLocation</key>
            <string></string>
            <key>sslKeyFileLocationEnabled</key>
            <integer>0</integer>
            <key>type</key>
            <string>SPTCPIPConnection</string>
            <key>useSSL</key>
            <integer>0</integer>
            <key>user</key>
            <string>%s</string>
        </dict>
    </dict>
    <key>encrypted</key>
    <false/>
    <key>format</key>
    <string>connection</string>
    <key>queryFavorites</key>
    <array/>
    <key>queryHistory</key>
    <array/>
    <key>rdbms_type</key>
    <string>mysql</string>
    <key>rdbms_version</key>
    <string>5.5.44</string>
    <key>version</key>
    <integer>1</integer>
</dict>
</plist>`

// DrudRouterTemplate is the template for the generic router container.
const DrudRouterTemplate = `version: '2'
services:
  nginx-proxy:
    image: {{ .router_image }}:{{ .router_tag }}
    container_name: nginx-proxy
    ports:
      - "80:80"
      - {{ .mailhogport }}:{{ .mailhogport }}
      - {{ .dbaport }}:{{ .dbaport }}
      - {{ .dbport }}:{{ .dbport }}
    volumes:
      - /var/run/docker.sock:/tmp/docker.sock:ro
networks:
   default:
     external:
       name: ddev_default
`

So this is actually a mistake that I introduced without realizing it, and have known would need to be fixed when we get here  . The format of the ports directive is "host:container". We only want the host port to change, not the internal container ports. The ports variable probably needs to be a map which maps external -> internal ports.