All guides

PHP · Laravel

Installs with composer and serves public/ as the document root.

  1. 1Environment

    bash
    oc db create mysql --name db
    oc variables set APP_KEY=base64:… APP_ENV=production
    oc variables set DB_CONNECTION=mysql DB_URL='${{db.DATABASE_URL}}'
  2. 2Start command

    bash
    php artisan migrate --force && php artisan serve --host 0.0.0.0 --port $PORT
  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

Related guides