Migrating buildpacks from heroku

Hi!

I’m importing app from heroku using procedure described here. I’ve got render.yaml, Dockerfile.render and .render-buildpacks.json files as a result. But when I deploy my application, I’m getting error which says that libreoffice is not installed (when my code tries to use it). It should be installed by one of build packs.

render.yaml

# This file was generated by Render's heroku-import Heroku CLI plugin
# https://www.npmjs.com/package/@renderinc/heroku-import
# Schema documented at https://render.com/docs/yaml-spec
services:
  - type: web # valid values: https://render.com/docs/yaml-spec#type
    name: izi-ndfl-api-staging
    env: docker # valid values: https://render.com/docs/yaml-spec#environment
    dockerfilePath: Dockerfile.render
    plan: free # optional; defaults to starter
    numInstances: 1

Dockerfile.render

# "v2-" stacks use our new, more rigorous buildpacks management system. They
# allow you to use multiple buildpacks in a single application, as well as to
# use custom buildpacks. We do not support using the original stack images with
# @renderinc/heroku-import v3.0.0 and above.
ARG HEROKU_STACK=v2-heroku-20
FROM ghcr.io/renderinc/heroku-app-builder:${HEROKU_STACK} 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. Build the app using the appropriate Heroku buildpacks. This supports both Heroku and custom buildpacks.

# 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_STACK} 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" ]

# 3. 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" ]

render.yaml

{
  "buildpacks": [
    "https://github.com/gaffneyc/heroku-buildpack-jemalloc.git",
    "heroku/ruby",
    "https://github.com/heroku/heroku-buildpack-apt.git",
    "https://github.com/BlueTeaLondon/heroku-buildpack-libreoffice-for-heroku-18.git"
  ]
}

these are the only files that were added on top of my app (except two script files for building and running app on render):

build.sh

#!/usr/bin/env bash

bundle install
bundle exec rake assets:precompile
bundle exec rake assets:clean
bundle exec rake db:migrate

run.sh

#!/usr/bin/env bash

bundle exec puma -C config/puma.rb

Maybe I’m missing something? I have a feeling, that buildpacks are not applied. I have free account and I cant ssh and inspect server/container, but if I inject the following command into my run.sh file:

which soffice the output is empty, but should be something like this /app/vendor/libreoffice/opt/libreoffice7.1/program/soffice

Sorry, I missed important moment, that type of app should be Blueprint. I tried to create native Ruby app. Solved

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