How to deploy old php website to koyeb

I have this side project with me since 2007, it is an one file php website with sqlite db and some pictures and js and css. I am keeping it just to monitor sometime how are the things at php side.

Anyway when I first build up this site I was using shared hosting, and in time I moved to dedicated server and today I decided to move to koyeb.com which is a nice cloud provider.

How to move old php code to cloud, I followed these steps

  1. I copied all code and files to my github repo
  2. created composer.json file with below text
    {
      "require": {
         "php": "^8.1",
         "ext-pdo": "*",
         "ext-pdo_sqlite": "*"
     }	
    }
    
  3. Installed composer as described here and ran composer update which will generate vendor folder and composer.lock
  4. Create Procfile file
    web: heroku-php-apache2 ./
    
  5. push all to git
  6. Go to koyeb console and deploy it to mini instance from github

I did not try to use Dockerfile but it can be configured with that too according to this page.

Reference: