Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated example for Laravel 8 and PHP 8? #26

Open
MeikyuuTrader opened this issue Feb 6, 2022 · 9 comments
Open

Updated example for Laravel 8 and PHP 8? #26

MeikyuuTrader opened this issue Feb 6, 2022 · 9 comments

Comments

@MeikyuuTrader
Copy link

MeikyuuTrader commented Feb 6, 2022

Can this example get updated for Laravel 8 and PHP 8?

richarvey/nginx-php-fpm 2.0.0 supports PHP 8.1.

@MeikyuuTrader
Copy link
Author

MeikyuuTrader commented Feb 6, 2022

Just tested deploying Laravel 8. Besides adding the different files (ones that aren't labelled as initial commit). Dockefile only needed to change nginx-fpm to 2.0.0. Eg.

FROM richarvey/nginx-php-fpm:2.0.0

Don't know how to submit pull requests so somebody please do that.

Also, I wonder if you could have a separate repo that only contains the necessary files to add to a default laravel install, like the Docker files, scripts etc. Instead of cloning a old Laravel package.

@connor11528
Copy link
Contributor

So all we need to do to update our app to PHP 8 is to update the Dockerfile to nginx-php-fpm:2.0.0?

@MeikyuuTrader
Copy link
Author

MeikyuuTrader commented Mar 27, 2022

So all we need to do to update our app to PHP 8 is to update the Dockerfile to nginx-php-fpm:2.0.0?

Yeap, top line from Dockerfile. Not sure if it'll work with Laravel 5.8 though, I'm using Laravel 8, now Laravel 9

FROM richarvey/nginx-php-fpm:2.0.4

Considering this isn't updated, and is listed on the official render docs on getting Laravel setup, I'd suggest keeping the docker files, scripts and have a bit about setting up force https as the package instead. That way it can be copied into existing Laravel apps.

@forerof
Copy link

forerof commented Sep 18, 2022

Could you explain step by step how to do the implementation with Laravel 9?

@MeikyuuTrader
Copy link
Author

Could you explain step by step how to do the implementation with Laravel 9?

Follow official Laravel guide and install Laravel 9.

After installed, copy the conf/nginx folder and .dockerignore Dockerfile into your new Laravel 9 directory.

In Dockerfile, change the first line, FROM richarvey/nginx-php-fpm:1.9.1 to FROM richarvey/nginx-php-fpm:2.0.4. That 'should' work. Change the version 2.0.4 to whatever the latest nginx-php-fpm is.

@forerof
Copy link

forerof commented Sep 29, 2022

Thanks a lot

@emmadonjo
Copy link

@MeikyuuTrader, thanks for the info. That saved me some headache.

I, however, made a small change to ensure new updates sync:

FROM richarvey/nginx-php-fpm:latest

@anuzpandey
Copy link

How do I install npm packages?
Can anyone help me with this?

@lombervid
Copy link

How do I install npm packages? Can anyone help me with this?

As far as I've seen, you can add script files in the scripts folder to be executed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

6 participants