title: Elasticsearch deployment on google app engine flex
body: <p>Is it possible to deploy Elasticsearch on App engine flex environment using a docker image.</p>
  
  <p>I have tried the following 
  My files on the local machine </p>
  
  <p>Folder : elasticsearch  </p>
  
  <pre><code>app.yaml
  Dockerfile
  docker-entrypoint.sh
  config folder(containing elasticsearch.yml)file
  </code></pre>
  
  <p>Contents of app.yaml </p>
  
  <pre><code>runtime: custom 
  env: flex
  </code></pre>
  
  <p>Dockerfile and docker-entrypoint.sh copied from <a href="https://github.com/GoogleCloudPlatform/elasticsearch-docker/tree/master/5/5.2.0" rel="nofollow noreferrer">https://github.com/GoogleCloudPlatform/elasticsearch-docker/tree/master/5/5.2.0</a></p>
  
  <p>Modifications to the Dockerfile</p>
  
  <pre><code>replaced EXPOSE 9200 9300 to EXPOSE 8080
  </code></pre>
  
  <p>Modification to the elasticsearch.yml</p>
  
  <pre><code>cluster.name: "beaconinside-docker-cluster"
  path.data: /usr/share/elasticsearch/data
  http.host: 0.0.0.0
  http.port: 8080
  discovery.zen.minimum_master_nodes: 1
  </code></pre>
  
  <p>I build a container using the docker file on my local machine</p>
  
  <pre><code>docker build -t elasticdemo .
  </code></pre>
  
  <p>Then, I run the container</p>
  
  <pre><code>docker run -p 8080:8080 elasticdemo
  </code></pre>
  
  <p>I am able to access elasticsearch on 0.0.0.0:8080</p>
  
  <p>Problem:</p>
  
  <p>I am trying to deploy elasticsearch as an app to Google app engine flex environment</p>
  
  <p>gcloud app deploy app.yaml --version elasticdocker --project myproject</p>
  
  <p>The deployment fails with the following error</p>
  
  <pre><code>Updating service [default]...failed.
  ERROR: (gcloud.app.deploy) Error Response: [9]
  </code></pre>
  
  <p>I was expected elasticsearch to deploy as an app and be available on the deployed url.
  Could you please provide pointers/help/suggestions with this approach?</p>