Skip to content

Release v3.6 #523

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

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open

Release v3.6 #523

wants to merge 20 commits into from

Conversation

jaydrogers
Copy link
Member

@jaydrogers jaydrogers commented Mar 5, 2025

πŸ‘¨β€πŸ”¬ Test this PR

You can test the latest changes on our serversideup/php-dev repo on DockerHub:

serversideup/php-dev:523-*

(Any thing prefixed with 523 [the PR number] is built from this PR)

If you notice an issues, please open an issue on GitHub and specifically include the versions that you're having issues with.

🎯 Project Board

View the GitHub Project β†’

πŸ€“ Docs Preview

View the latest docs β†’

⚑️ What's new

The following changes are available with this PR:

🌎 New Environment Variables

Environment Variable Default Authored By
AUTORUN_DEBUG false @jaydrogers
AUTORUN_LARAVEL_SEED false @DarkGhostHunter
PHP_FPM_PM_MAX_REQUESTS 0 @ifaridjalilov, @thueske
PHP_MAX_INPUT_VARS 1000 @RadeJR
PHP_OPCACHE_FORCE_RESTART_TIMEOUT 180 @aSeriousDeveloper, @jaydrogers
PHP_OPCACHE_JIT off @aSeriousDeveloper, @jaydrogers
PHP_OPCACHE_JIT_BUFFER_SIZE 0 @aSeriousDeveloper, @jaydrogers
PHP_OPCACHE_SAVE_COMMENTS 1 @aSeriousDeveloper, @jaydrogers
PHP_OPCACHE_VALIDATE_TIMESTAMPS 1 @aSeriousDeveloper, @jaydrogers

🀩 New Features

  • Added php artisan optimize support to the Laravel Automations script
  • Added php artisan db:seed support to the Laravel Automations script
  • Added AUTORUN_DEBUG environment variable to help diagnose issues with Laravel Automations
  • Refactored entire Laravel Automations script for better flexbility and user experience
  • Changed approach to executing entrypoint.d scripts so we can gracefully handle exit 0 in a entrypoint script
  • Re-designed container start up info script

πŸ› Bug Fixes

  • Re-added docker-serversideup-php-s6-init back for advanced S6 dependency use cases (Custom s6 services dependencies no longer worksΒ #479)
  • Fixed issue where Alpine images were the /run directory was not being changed when running docker-php-serversideup-set-file-permissions

⏫️ Upstream Dependencies

πŸ‘¨β€πŸ”¬ Tests to perform

Migrations

  • Deploy a Laravel 12 app with isolated migrations using SQLite
  • Deploy a migration that will fail, which should cause the container to exit
  • Deploy a Laravel 7 app with AUTORUN_LARAVEL_OPTIMIZE=true and AUTORUN_LARAVEL_ROUTE_CACHE=false

Start Up Scripts

  • Create a startup script with exit 0 -- the following scripts should continue
  • Create a startup script with exit 1 -- the following container should exit
  • Create a startup script with return 0 -- the following scripts should continue
  • Create a startup script with return 1 -- the following container should exit
  • A failed database connection on auto migration should cause the container to exit

Copy link

cloudflare-workers-and-pages bot commented Mar 5, 2025

Deploying serversideup-php with Β Cloudflare Pages Β Cloudflare Pages

Latest commit: 2ffee5f
Status:Β βœ…Β  Deploy successful!
Preview URL: https://55cd2431.serversideup-php.pages.dev
Branch Preview URL: https://release-v3-6.serversideup-php.pages.dev

View logs

jaydrogers and others added 4 commits March 5, 2025 15:21
* Added configurability for max_input_vars and default value

* A-z variables

---------

Co-authored-by: Ilija Radojkovic <[email protected]>
Co-authored-by: Jay Rogers <[email protected]>
aSeriousDeveloper and others added 5 commits March 6, 2025 13:38
* Expose opcache.validate_timestamps to .env

* Add PHP_OPCACHE_VALIDATE_TIMESTAMPS to CLI ENV

* Add PHP_OPCACHE_VALIDATE_TIMESTAMPS to Apache ENV

* Add PHP_OPCACHE_VALIDATE_TIMESTAMPS to Nginx Unit ENV

* Add PHP_OPCACHE_VALIDATE_TIMESTAMPS to Nginx ENV

* Add PHP_OPCACHE_VALIDATE_TIMESTAMPS to FPM ENV

* Include PHP_OPCACHE_VALIDATE_TIMESTAMPS in docs

* match capitalisation

* Add PHP_OPCACHE_SAVE_COMMENTS environment variable for OPcache configuration

* Add PHP_OPCACHE_FORCE_RESTART_TIMEOUT environment variable for OPcache configuration

* Add PHP_OPCACHE_JIT_BUFFER_SIZE environment variable for OPcache JIT configuration

* Add PHP_OPCACHE_JIT environment variable for OPcache JIT configuration

---------

Co-authored-by: Jay Rogers <[email protected]>
…r info improvements (#511)

* Update 50-laravel-automations.sh

* Update Command Reference

* Mention optimize in automations documentation

* Attempt to use --except when running artisan optimize

* Update docs to mention new function of optimize

* Mention --except in env spec

* POSIX /bin/sh compatibility, refactor into functions

* Remove erroneous concatenate

* Fix typo

Co-authored-by: Paul <[email protected]>

* typo fix

Co-authored-by: Erik Gaal <[email protected]>

* typo fix

Co-authored-by: Erik Gaal <[email protected]>

* typo fix

Co-authored-by: Erik Gaal <[email protected]>

* Improve entrypoint script management and error handling

- Update entrypoint script to use subshell for script execution
- Enhance logging and error reporting for initialization scripts
- Remove "Don't use exit 0" section from documentation
- Modify exit handling in initialization scripts to preserve environment

* Update shell script compatibility guidelines

Clarify shell script compatibility requirements for different Linux distributions and operating systems, specifying separate guidelines for /bin/sh and /bin/bash scripts

* Enhance container info script with more detailed system information

- Improve welcome message layout and readability
- Add memory and upload limit information
- Include Docker CMD in runtime section
- Replace `return 0` with `exit 0` for script termination
- Update links and formatting for better user experience

* Export Docker CMD for use in initialization scripts

- Add DOCKER_CMD environment variable to capture the original Docker command
- Enable easier access to the original command in subsequent initialization scripts

* Major refactor of Laravel automations script

- Add `AUTORUN_DEBUG` environment variable for detailed Laravel automation logging
- Implement comprehensive Laravel version detection and compatibility checks
- Improve optimization and migration scripts with granular control
- Update documentation to reflect new automation features

* Update docs to reflect change in optimize process

* Fix Joel's Twitter profile πŸ˜ƒ

* Update Laravel Automations documentation

- Improve description and clarity of Laravel Automations script
- Add comprehensive table of environment variables and their functions
- Update links to Laravel documentation to version 12.x
- Enhance explanations for each Laravel artisan command
- Refactor content to provide more detailed and user-friendly information

* Add debugging section for Laravel Automations script

- Document troubleshooting steps for AUTORUN script
- Explain how to enable debug output with environment variables
- Provide best practices for preventing AUTORUN script issues

* Improve NGINX health check logging and debug output

- Add conditional debug logging for NGINX + PHP-FPM health checks
- Display more informative message when service is not yet online
- Only show HTTP status code when debug mode is enabled

* Fix warning about /run not being correct permissions on Alpine

* Update Laravel Automations documentation with optimize command details

- Add explanation for disabling the `optimize` command
- Highlight the benefits of using the `optimize` command
- Improve formatting of section headers for better readability

---------

Co-authored-by: Paul <[email protected]>
Co-authored-by: Erik Gaal <[email protected]>
Co-authored-by: Jay Rogers <[email protected]>
* Adds opt-in seeding

* Updated seeders to execute correctly. Configured defaults.

* Add documentation for Laravel db:seed automation option

---------

Co-authored-by: Jay Rogers <[email protected]>
@jaydrogers jaydrogers marked this pull request as ready for review March 11, 2025 19:15
Copy link

@piotrpawelczyk piotrpawelczyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Paths are hardcoded in these scripts but can be overriden with ENV variables. Shouldn't that be taken into account?

@thueske
Copy link

thueske commented Apr 14, 2025

Any ETA for this Release? :)

@jaydrogers
Copy link
Member Author

πŸ‘¨β€πŸ”¬ Test this PR

You can test the latest changes on our serversideup/php-dev repo on DockerHub:

serversideup/php-dev:523-*

(Any thing prefixed with 523 [the PR number] is built from this PR)

πŸ€” Plan for launch

@thueske: Any ETA for this Release? :)

I am testing this PRs with my client project as we're entering a QA round with them. I hope to have a beta in the next week or so then if everything is stable -- production launch after that πŸ‘

I had some client projects that required a lot of attention recently. Good news is I have a build process if you want to test this PR already (see original comment or below):

❓ Hardcoded paths

@piotrpawelczyk: Paths are hardcoded in these scripts but can be overriden with ENV variables. Shouldn't that be taken into account?

Can you add comments where you're specifically talking about? I did a quick look and I see relative paths with the ENV

php "$APP_BASE_DIR/artisan" config:clear

@thueske
Copy link

thueske commented Apr 18, 2025

Thanks @jaydrogers! Will test this PR-Image in my ~30 Client sites.

@jaydrogers
Copy link
Member Author

Will test this PR-Image in my ~30 Client sites

I wouldn't call them "stable" yet, but it is working for one of our very complicated client testing sites:

  • Traefik
  • Laravel 12
  • Laravel Horizon
  • Laravel Scheduler
  • Laravel Reverb
  • Meilisearch
  • serversideup/docker-ssh
  • Redis
  • MariaDB

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.

7 participants