title: Prisma 1 + MongoDB Atlas deploy to Heroku returns error 404
body: <p>I've deployed a <em>Prisma 1 GraphQL</em> server app on <em>Heroku</em>, connected to a <em>MongoDB Atlas</em> cluster.
  Running <code>prisma deploy</code> locally with the default endpoint <code>http://localhost:4466</code>, the action being run successfully and all the schemas are being generated correctly.
  But, if I change the endpoint with the Heroku remote host <code>https://&lt;myapp&gt;.herokuapp.com</code>, <code>prisma deploy</code> fails, returning this exception:</p>
  <blockquote>
  <p>ERROR: GraphQL Error (Code: 404)
  {
  &quot;error&quot;: &quot;\n&lt;html lang=&quot;en&quot;&gt;\n\n&lt;meta charset=&quot;utf-8&quot;&gt;\nError\n\n\n<pre>Cannot POST /management</pre>\n\n\n&quot;,
  &quot;status&quot;: 404
  }</p>
  </blockquote>
  <p>I think that's could be related to an authentication problem, but I'm getting confused because I've defined both security token in <code>prisma.yml</code> than the management API secret key in <code>docker-compose.yml</code>.
  Here's my current configs if it could be helpful:</p>
  <p><strong>prisma.yml</strong></p>
  <pre><code># The HTTP endpoint for your Prisma API
  # Tried with https://&lt;myapp&gt;.herokuapp.com only too with the same result
  endpoint: https://&lt;myapp&gt;.herokuapp.com/dinai/staging
  secret: ${env:PRISMA_SERVICE_SECRET}
  # Points to the file that contains your datamodel
  datamodel: datamodel.prisma
  databaseType: document
  # Specifies language &amp; location for the generated Prisma client
  generate:
    - generator: javascript-client
      output: ../src/generated/prisma-client
  # Ensures Prisma client is re-generated after a datamodel change.
  hooks:
    post-deploy:
      - prisma generate
  </code></pre>
  <p><strong>docker-compose.yml</strong></p>
  <pre><code>version: '3'
  services:
    prisma:
      image: prismagraphql/prisma:1.34
      restart: always
      ports:
      - &quot;4466:4466&quot;
      environment:
        PRISMA_CONFIG: |
          port: 4466
          # uncomment the next line and provide the env var PRISMA_MANAGEMENT_API_SECRET=my-secret to activate cluster security
          managementApiSecret: ${PRISMA_MANAGEMENT_API_SECRET}
          databases:
            default:
              connector: mongo
              uri: mongodb+srv://${MONGO_DB_USER}:${MONGO_DB_PASSWORD}@${MONGO_DB_CLUSTER}/myapp?retryWrites=true&amp;w=majority
              database: myapp
  </code></pre>
  <p>Plus, a weird situation happens too. In both cases, if I try to navigate the resulting API with <em>GraphQL Playground</em>, clicking on the tab &quot;Schema&quot; returns an error. On the other side, the tab &quot;Docs&quot; is being populated correctly. Apparently, seems that the exception is blocking the script finishing to generate the rest of the schemas.</p>
  <p>A little help by someone experienced with Prisma/Heroku would be awesome.</p>
  <p>Thanks in advance.</p>