Dockerfile migrated from Heroku fails with /render/process/web: line 2: XXX: No such file or directory

Hi,

I followed the Render steps to migrate an app from Heroku and it created a render.yaml and Dockerfile.render for me. I was able to edit the render.yaml to set up the services and create them using the blueprint feature. However the web service deploy fails with error:
/render/process/web: line 2: github.com/ansonl/XXX: No such file or directory

The application language is Go on v1.19. The module name in my go.mod is module github.com/ansonl/XXX.

The Dockerfile.render

FROM ghcr.io/renderinc/heroku-app-builder:heroku-18 AS builder

# The FROM statement above triggers the following steps

# 1. Copy the contents of the directory containing this Dockerfile to a Docker image

# 2. Detect the language

# 3. Build the app using the appropriate Heroku buildpack. All Heroku's official buildpacks are supported.

# For running the app, we use a clean base image and also one without Ubuntu development packages

# https://devcenter.heroku.com/articles/heroku-20-stack#heroku-20-docker-image

FROM ghcr.io/renderinc/heroku-app-runner:heroku-18 AS runner

# Copy build artifacts to runtime image

COPY --from=builder --chown=1000:1000 /render /render/

COPY --from=builder --chown=1000:1000 /app /app/

# Switch to non-root user

USER 1000:1000

WORKDIR /app

# Source all /app/.profile.d/*.sh files before process start.

# These are created by buildpacks.

# https://devcenter.heroku.com/articles/buildpack-api#profile-d-scripts

ENTRYPOINT [ "/render/setup-env" ]

# 4. By default, run the 'web' process type defined in the app's Procfile

# You may override the process type that is run by replacing 'web' with another

# process type name in the CMD line below. That process type must have been

# defined in the app's Procfile during build.

CMD [ "/render/process/web" ]

The Procfile
web: github.com/ansonl/XXX

I have also tried a Procfile of
web: XXX

which results in the same error of

/render/process/web: line 2: XXX: command not found

Is there another expected application executable name that should be used in the Procfile or other change needed?

Hi -

Render doesn’t directly manage buildpack behavior; we import buildpacks from Heroku in order to duplicate their functionality. It looks as though the buildpack expects an executable to be generated that has the same name as the repository. If your particular Golang repository emits an executable with a different name, you’ll need to update the Procfile to reflect that.

https://github.com/heroku/heroku-buildpack-go#default-procfile

In addition, it looks like you’re using the old version of our migrator. Version 3.x adds clearer messaging and some additional flexibility around continuing to use buildpacks on Render long-term, and we recommend upgrading by reinstalling the plugin into your Heroku CLI app.

Thanks!

Thank you for the reply. I found that the importer was not creating a .render-buildpacks.json file which I created myself for it to recognize the right language.

{
    "buildpacks": [
      "heroku/go"
    ]
  }

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.