Skip to content

Conversation

@fideloper
Copy link
Contributor

@fideloper fideloper commented Aug 8, 2022

Depends on: #1142

What's Happening Here

  1. We're using a different base container
  2. Not Alpine based
  3. This makes it easier to switch PHP version (changing the FROM: section)

We don't use the "official" PHP images as they're...sort of ridiculous. They come with long compilation steps for adding in basic modules (we'd end up hosting and managing base containers ourselves).

Similarish to Phoenix / Rails, we detect the php version the user runs locally, and use that version for the base container. Failing that, we fall back to php 8.0 (latest is 8.1) as it has the most broad compatibility.

TODO

  • Use composer install instead of composer update
  • Make PHP version changes easy
  • Support cron tasks for Laravel scheduler
  • Get PHP version the user has locally
    • Previously: Scan composer.lock to see what PHP version we need to support
  • Support octane (swoole and roadrunner)

To Do Elsewhere

To do in the docs:

  • Document [[processes]] section to run cron / worker instead of having it all in one container
    • Note this is a change from having it all run in one container
  • Document [build] arguments PHP_VERSION and NODE_VERSION

@fideloper fideloper changed the title Dockerfile lost the ability to build static assets Laravel docker improvements Aug 8, 2022
@fideloper fideloper marked this pull request as ready for review August 10, 2022 19:45
@fideloper fideloper requested a review from jsierles August 10, 2022 19:45
@fideloper fideloper merged commit 5b9c7bc into master Aug 11, 2022
@fideloper fideloper deleted the laravel-improvements branch August 11, 2022 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants