Issue deploying new sinatra app

Let’s try a Dockerfile instead. I can help optimize this later, but remove the [build] section from your fly.toml, create a file named Dockerfile with the following contents, and then try fly deploy again:

ARG RUBY_VERSION=3.2.1
FROM ruby:$RUBY_VERSION-slim as base

WORKDIR /sinatra

RUN apt-get update -qq && \
    apt-get install --no-install-recommends -y build-essential

COPY Gemfile* .

RUN bundle install

COPY . .

EXPOSE 8080

CMD ["rackup", "--host", "0.0.0.0", "--port", "8080"]

Adjust the value of RUBY_VERSION to match what you are using locally.

1 Like