Hi,
I am trying to launch a Ruby worker on App Platform. However, I’m facing an issue of which I’m unable to figure out why.
I have a simple Ruby application that connects to a RabbitMQ channel (Hosted on a RabbitMQ as a Service provider, not DigitalOcean) and executes jobs based on those messages. Probably this is not very relevant because even when I comment out this part of the code and just run a very simple:
loop do
puts "sleep"
sleep 6
end
What I’m facing
bundle exec ruby app.rb
which launches the application and it runs fine on the DigitalOcean machine.What I’ve tried
bundle exec ruby app.rb
as Run Command (With and without a Dockerfile)FROM ruby:2.6.3
RUN apt-get update -qq && apt-get install -y build-essential
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN apt-get update && apt-get install yarn -y
RUN mkdir /app
WORKDIR /app
RUN gem install bundler
COPY Gemfile /app/Gemfile
COPY Gemfile.lock /app/Gemfile.lock
RUN bundle install
COPY . /app
CMD ["bundle", "exec", "ruby", "app.rb"]
Does anyone here have a clue what I’m doing wrong or what’s going wrong?
Click below to sign up and get $100 of credit to try our products over 60 days!