Commit graph

11 commits

Author SHA1 Message Date
copilot-swe-agent[bot]
c5210a33c4 Force asset build stages to run on native platform with --platform=$BUILDPLATFORM
Some checks failed
Docker Image Build / docker (push) Has been cancelled
Docker Image Build (FrankenPHP) / docker (push) Has been cancelled
Added --platform=$BUILDPLATFORM to composer-deps and assets stages to ensure they run on the native build platform (amd64) instead of being built separately for each target architecture (amd64, arm64, arm/v7).

This is the critical change that makes the optimization work:
- Without this flag, Docker Buildx builds these stages for each target platform
- With this flag, stages run once on native platform and results are copied to all targets
- Eliminates ARM emulation overhead for CPU-intensive asset compilation

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>
2025-12-07 21:06:09 +00:00
copilot-swe-agent[bot]
6a1792d46a Simplify asset build: copy entire project instead of individual files
Refactored to copy the entire project directory in composer-deps and assets stages instead of cherry-picking specific files. This:
- Eliminates the separate translations stage
- Avoids missing file issues
- Simplifies the build process
- Maintains performance benefit of building assets once on native platform

Both stages now use COPY . . to get all project files, avoiding the complexity of tracking which files are needed.

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>
2025-12-07 20:48:51 +00:00
copilot-swe-agent[bot]
9402382d56 Copy .env file to translations stage for Symfony console commands
Symfony console requires .env file to bootstrap. Added COPY .env to translations stage so cache:warmup can run successfully.

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>
2025-12-07 21:43:35 +01:00
copilot-swe-agent[bot]
a604ec8476 Add translations stage to generate Symfony translations for webpack
Webpack build requires var/translations files generated by Symfony's cache warmup. Added intermediate 'translations' stage that:
- Copies composer dependencies and app files
- Generates autoloader
- Runs cache warmup to create translation files
- Assets stage now copies these translations before building

This fixes the webpack build errors about missing translation exports.

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>
2025-12-07 21:43:35 +01:00
copilot-swe-agent[bot]
2e79df3155 Optimize Docker build: Build assets outside ARM emulation
- Add multi-stage build with separate composer-deps and assets stages
- Assets are built once on native platform (node:22-bookworm-slim)
- Pre-built assets copied into final images for all platforms
- Remove Node.js/Yarn installation from final images (smaller size)
- Use --ignore-platform-reqs for composer in assets stage
- Applies to both Dockerfile and Dockerfile-frankenphp

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>
2025-12-07 21:43:35 +01:00
Jan Böhmer
93b04fbf94 Use nodejs 22 in docker images
Some checks failed
Build assets artifact / Build assets artifact (push) Has been cancelled
Docker Image Build / docker (push) Has been cancelled
Docker Image Build (FrankenPHP) / docker (push) Has been cancelled
Static analysis / Static analysis (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Has been cancelled
2025-08-30 00:32:43 +02:00
Jan Böhmer
a2d94b54b1 Use PHP 8.4 in docker images 2025-08-30 00:31:50 +02:00
Jan Böhmer
1aedcc056f Fixed (hopefully) frankenphp dockerfile 2025-08-30 00:30:54 +02:00
David Girón
b5a0189f29
feat(docker): Refactor Dockerfile (#683)
* reorder nodejs/yarn install, separate packages per line

* reduce run actions and reorganize commands

* simplify file creation, copy in one layer only

* fix lint LegacyKeyValueFormat

* arg php_version to run different version

* reorder copy from generated config

* update dockerfile-frankenphp
2024-09-08 19:13:13 +02:00
Jan Böhmer
228549ff51 Include pgsql extensions and client in docker images 2024-07-28 13:12:42 +02:00
Jan Böhmer
3191028f74 Added an github action to build the frankenPHP docker image 2024-03-10 23:44:34 +01:00