全部指南

Ruby · Rails

Detects the Gemfile, runs bundle install, then starts the app.

  1. 1Start command

    bash
    bundle exec rails db:migrate && bundle exec rails server -b 0.0.0.0 -p $PORT
  2. 2Environment

    bash
    oc variables set RAILS_ENV=production SECRET_KEY_BASE=… DATABASE_URL='${{db.DATABASE_URL}}'
  3. 3Deploy (pick one)

    ① Connect GitHub: Project → Add service → GitHub repository (deploys on push) ② From this folder: oc up --wait (builds even without a Dockerfile) ③ Upload a folder or zip in the console: Add service → Upload source

    bash
    oc login
    oc project create my-app --link
    oc up --wait

相關指南