# Auto-generated by GitBlixt for Ruby apps (Sinatra, Rack, etc.) FROM docker.io/ruby:3.3-slim RUN apt-get update -qq \ && apt-get install -y --no-install-recommends \ build-essential git libpq-dev curl ca-certificates \ && rm -rf /var/lib/apt/lists/* WORKDIR /app ENV BUNDLE_DEPLOYMENT=true ENV BUNDLE_WITHOUT=development:test COPY Gemfile Gemfile.lock* ./ RUN bundle install --jobs 4 COPY . . ENV PORT=4000 EXPOSE ${PORT} CMD sh -c "if [ -f config.ru ]; then exec bundle exec rackup --host 0.0.0.0 --port ${PORT}; elif [ -f app.rb ]; then exec bundle exec ruby app.rb; else echo 'No config.ru or app.rb found — customize the Dockerfile CMD'; exit 1; fi"