title: Route url to GAE Flex server while rest of site runs on GAE Standard
body: <p>Using Google App Engine Standard Python 2.7, I have a path in my dispatch.yaml to specify all urls of type "*/flex/*" to route to the flex service.</p>
  
  <p>dispatch.yaml
  dispatch:</p>
  
  <pre><code>- url: '*/flex/*'
      module: flex
  </code></pre>
  
  <p>The flex environment is a custom python 3.7 runtime which is executed normally using:</p>
  
  <p><code>python dev_appserver.py flex.yaml --custom_entrypoint="docker run -p 9090:8080 flex_app"</code>. </p>
  
  <p>With other services in my environment, I attempt to launch a dev environment with the command:
  <code>python dev_appserver.py dispatch.yaml default.yaml sync.yaml task.yaml flex.yaml --custom_entrypoint="docker run -p 9090:8080 flex_app" --port=8080 --skip_sdk_update_check"</code></p>
  
  <p>However, when this starts, it starts assigning local ip addresses to each service when I need the flex service to be accessed from port 9090. </p>
  
  <p>Example server output:</p>
  
  <pre><code>INFO     devappserver2.py:278] Skipping SDK update check.
  INFO     dispatcher.py:223] Starting dispatcher running at: http://0.0.0.0:8080
  INFO     dispatcher.py:256] Starting module "default" running at: http://0.0.0.0:8081
  INFO     dispatcher.py:256] Starting module "sync" running at: http://0.0.0.0:8082
  INFO     dispatcher.py:256] Starting module "task" running at: http://0.0.0.0:8083
  INFO     dispatcher.py:256] Starting module "flex" running at: http://0.0.0.0:8084
  </code></pre>
  
  <p>I am able to successfully access the flex app if I hit the URL localhost:9090. However, if I access localhost:8084 or localhost:8080/flex/, I receive the error:</p>
  
  <p><code>503 - This request has timed out.</code></p>
  
  <p>The server logs reflect this but do not show an actual error:</p>
  
  <p><code>INFO     module.py:861] flex: "GET / HTTP/1.1" 503 59</code></p>
  
  <p>Is it possible to dispatch urls from GAE Standard Environments to a Flex environment and have it route from its designated port to the desired port needed? I would think this is possible as <a href="https://cloud.google.com/appengine/docs/the-appengine-environments" rel="nofollow noreferrer">Google App Engine's Doc</a> specifies it is possible to mix the environments together. I've also attempted to solve this by forcing docker to run on port 8084 but the ports can't be shared.</p>