You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
authored
Fix Satis deploy docs: pin dev-main, separate install dir from executable path (#10)
Three real deploy bugs hit in the field:
1. `composer create-project composer/satis` unpinned resolves to satis
1.0.0 (the only stable tag), which requires php ^5.6 || ^7.0 and
fails on modern PHP. Pin composer/satis:dev-main.
2. deploy.md used $CRATE_SATIS_PATH as both the create-project target
(a directory) and the value BuildSatis executes as the satis binary.
These are two different paths: the executable lands at
<install-dir>/bin/satis and Composer does not link a root package's
bin into vendor/bin. Build Command and crate:install examples now
use distinct install-dir / executable paths.
3. The config default (vendor/bin/satis) contradicts the "keep Satis
isolated" rule — it only exists if Satis is required into the app
vendor tree. All three docs now describe CRATE_SATIS_PATH as the
isolated Satis executable path and state isolated deploys must set
it explicitly; config gains a clarifying comment (default unchanged).
Co-authored-by: Ed Grosvenor <ed@artisan.build>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,7 @@ Crate-specific server config lives in `config/crate-server.php`:
74
74
75
75
-`CRATE_URL`: the public registry URL used as Satis `homepage` and archive prefix.
76
76
-`CRATE_ARCHIVE_DISK`: disk for Composer metadata and mirrored dist archives.
77
-
-`CRATE_SATIS_PATH`: path to the isolated Satis binary.
77
+
-`CRATE_SATIS_PATH`: path to the isolated Satis executable (`<install-dir>/bin/satis`), run directly by the build job. Install Satis with `composer create-project composer/satis:dev-main` (an unpinned install resolves to the ancient 1.0.0 stable and fails on modern PHP). The default (`vendor/bin/satis`) only applies if Satis is installed into the app's vendor directory, which is discouraged — isolated deploys must set this explicitly. See `docs/deploy.md`.
78
78
-`CRATE_OUTPUT_DIR`: storage prefix for generated registry output.
79
79
80
80
Do not hand-set Laravel Cloud managed resource credentials for database, queue, cache, or object storage. Let Cloud inject them.
Do not `composer require` Satis into the Crate app. It must stay isolated because its dependency tree is separate from the Laravel app's dependency tree.
30
+
Pin `dev-main` explicitly. Satis has no recent stable tag, so an unpinned `composer create-project composer/satis` resolves to satis 1.0.0 and fails on any modern runtime with:
31
+
32
+
```
33
+
Cannot use composer/satis's latest version 1.0.0 as it requires php ^5.6 || ^7.0 which is not satisfied by your platform.
34
+
```
35
+
36
+
Note the two distinct paths involved. The `create-project` target (`../satis-tool` above) is the install *directory*; the Satis *executable* lands inside it at `../satis-tool/bin/satis` (Composer does not link a root package's bin into `vendor/bin`). `CRATE_SATIS_PATH` must point at the executable, not the install directory — Crate's build job runs that path directly:
37
+
38
+
```bash
39
+
CRATE_SATIS_PATH=../satis-tool/bin/satis # prefer an absolute path in real deploys
40
+
```
41
+
42
+
Do not `composer require` Satis into the Crate app. It must stay isolated because its dependency tree is separate from the Laravel app's dependency tree. Because Satis lives outside the app, the config default for `CRATE_SATIS_PATH` (`vendor/bin/satis`, which would only exist if Satis were required into the app) never applies — an isolated deploy must always set `CRATE_SATIS_PATH` explicitly.
31
43
32
44
Ensure `git` is available anywhere Satis runs, including the build and queue runtimes. Satis uses it to read VCS repositories during registry builds.
33
45
@@ -40,18 +52,20 @@ Run the installer on the deployed environment. Run it interactively (it prompts
40
52
php artisan crate:install
41
53
42
54
# non-interactive (a bare crate:install with no TTY and no flags makes no changes)
55
+
# --satis-path is the Satis EXECUTABLE inside the isolated install from the
56
+
# Build Command step, not the install directory
43
57
php artisan crate:install --no-interaction \
44
58
--url="https://crate.example.com" \
45
59
--archive-disk="crate-archive" \
46
-
--satis-path="$CRATE_SATIS_PATH" \
60
+
--satis-path="/path/to/satis-tool/bin/satis" \
47
61
--credential-api=true
48
62
```
49
63
50
64
The installer is idempotent and will not overwrite an existing value without confirmation (pass `--force` non-interactively). It configures only these app values:
51
65
52
66
-`CRATE_URL`: the public Crate registry URL used as the Satis homepage and archive prefix.
53
67
-`CRATE_ARCHIVE_DISK`: the object-storage filesystem disk name Crate should use for Satis output and mirrored archives.
54
-
-`CRATE_SATIS_PATH`: the path to the isolated Satis binary or installation.
68
+
-`CRATE_SATIS_PATH`: the path to the isolated Satis executable (`<install-dir>/bin/satis`), which the build job executes directly. The config default (`vendor/bin/satis`) only applies if Satis is installed into the app's own vendor directory — which the Build Command section advises against — so isolated deploys must set this explicitly.
55
69
-`BUILT_FOR_CLOUD_CREDENTIAL_API_ENABLED`: whether built-for-cloud's admin-token credential API is enabled.
Copy file name to clipboardExpand all lines: packages/crate-server/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,7 +76,7 @@ Environment variables:
76
76
77
77
-`CRATE_URL`: public registry URL used by Satis metadata and dist archive URLs.
78
78
-`CRATE_ARCHIVE_DISK`: storage disk for generated metadata and mirrored archives. Defaults to `FILESYSTEM_DISK` then `local`.
79
-
-`CRATE_SATIS_PATH`: isolated Satis binary path. Defaults to `vendor/bin/satis`.
79
+
-`CRATE_SATIS_PATH`: path to the isolated Satis executable (`<install-dir>/bin/satis`), executed directly by `BuildSatis`. Defaults to `vendor/bin/satis`, which only applies if Satis is installed into the app's own vendor tree — isolated installs (recommended; install via `composer create-project composer/satis:dev-main`) must set it explicitly.
80
80
-`CRATE_OUTPUT_DIR`: storage prefix for generated registry output. Defaults to `satis`.
81
81
-`CRATE_DB_*`: optional separate database connection settings. If omitted, the app's default database connection is reused as `crate`.
0 commit comments