apolopena / gitpod-laravel-starter

Configurable LAMP or LEMP stack starter project powered by Laravel and Gitpod. Supports Laravel 6, 7, and 8. Out of the box support for React, Vue, and Bootstrap frontends, with or without built-in auth .
https://github.com/apolopena/gitpod-laravel-starter/wiki
MIT License
40 stars 44 forks source link

php-fpm is not installed when using 'gitpodlatest' for the PHP version in starter.ini #203

Open apolopena opened 2 years ago

apolopena commented 2 years ago

Describe the bug

When using the existing installation of PHP in gitpod/workspace-mysql, php-fpm is not installed so PHP does not work with nginx out of the box. This breaks the demo flow when nginx is the default server (which currently is the default in starter.ini).

Screenshots

image

Steps to reproduce

  1. ensure docker image layer cache is busted
  2. run a gitpod-laravel-starter with 'gitpodlatest' set for the PHP version in starter.ini

Expected behavior

Ideally php-fpm would be installed as part of gitpod/workspace-mysql. There is a question there in a PR that rasies this thought.

At a minimum php-fpm must be installed in php.sh when the existing Gitpod installation of PHP is left as-is. This will of course need to be removed if Gitpod decides to includes php-fpm in gitpod/workspace-mysql We could sniff for the php-fpm installation and act accordingly but I would rather not introduce that complexity.

Additional information

I decided to go with sniffing out the php-fpm install and dynamically installing it if it wasn't already installed.

apolopena commented 2 years ago

depends on https://github.com/apolopena/gitpod-laravel-starter/issues/204