jdecool/scaleway-runtimepublic Fork
⑂ ci/rickub
Commits
⬇ Clone ▾
git clone https://git.rickub.com/jdecool/scaleway-runtime.git
git clone ssh://git@rickub.com/jdecool/scaleway-runtime.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP
feat(package)!: let Scaleway install the dependencies 74ba5e0Unverified · on ci/rickub · Jérémy DECOOL · 10d ago
0003-ship-vendor-and-warm-cache-in-zip.md · 14 lines · 1.1 KBmarkdown
Blame HistoryOpen raw

status: superseded by ADR-0008

The deployment zip ships vendor/ and a warmed-up cache

Scaleway can install Composer dependencies itself at deploy time, which is its documented path.
We instead build the zip with composer install --no-dev -o and a prod cache:warmup, so builds are reproducible and Invocations never pay container compilation on a possibly read-only filesystem.

Consequences

  • scaleway-package requires a committed composer.lock and installs with --classmap-authoritative, as Symfony recommends for production: the warmed container is loaded by path, not through the autoloader, so nothing generated at runtime depends on autoload fallbacks.
  • .env files are shipped as they are, without composer dump-env prod: that command comes from Symfony Flex, which applications may not have, and .env is parsed once per Warm Process anyway; .env.local and .env.local.php stay out of the zip as machine-local configuration.
  • The zip also ships composer.json, which the Kernel needs to find its project dir; whether Scaleway then runs Composer over the shipped vendor/ is checked by the probe function.
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
---
status: superseded by ADR-0008
---

# The deployment zip ships vendor/ and a warmed-up cache

Scaleway can install Composer dependencies itself at deploy time, which is its documented path.
We instead build the zip with `composer install --no-dev -o` and a prod `cache:warmup`, so builds are reproducible and Invocations never pay container compilation on a possibly read-only filesystem.

## Consequences

- `scaleway-package` requires a committed `composer.lock` and installs with `--classmap-authoritative`, as Symfony recommends for production: the warmed container is loaded by path, not through the autoloader, so nothing generated at runtime depends on autoload fallbacks.
- `.env` files are shipped as they are, without `composer dump-env prod`: that command comes from Symfony Flex, which applications may not have, and `.env` is parsed once per Warm Process anyway; `.env.local` and `.env.local.php` stay out of the zip as machine-local configuration.
- The zip also ships `composer.json`, which the Kernel needs to find its project dir; whether Scaleway then runs Composer over the shipped `vendor/` is checked by the probe function.