Skip to content

Commit 467b70a

Browse files
ausimianclaude
andcommitted
docs: say what the env.sh hook does on a first start
It said the hook does nothing on a normal start and is reserved for the provisional version marker. On the first start of a deployment it creates releases/RELEASES, in a short-lived VM, which is what lets the system manage its own releases at all. Two things an operator needs and could not have read: that first start pays for a VM, and that the release root has to be writable — if it is not, the start proceeds with a warning and bin/castle unpack later refuses rather than upgrading a system that cannot record what it is running. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 9c4188d commit 467b70a

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,16 @@ In the post-assembly step:
102102

103103
- A `bin/castle` command is added, providing the commands that manage releases.
104104
The standard `bin/<release>` launcher that Mix generates is left untouched.
105-
- The generated `env.sh` is extended with a hook that does nothing on a normal
106-
start, and is reserved for consuming the provisional version marker that a
107-
relup restarting the emulator leaves behind. Any `env.sh` the project
108-
supplies through `rel/env.sh.eex` is preserved, and runs first.
105+
- The generated `env.sh` is extended with a hook. On the **first** start of a
106+
deployment it creates `releases/RELEASES`, which is what lets the system
107+
manage its own releases — a short-lived VM, once, and only while that file
108+
is absent. The release root has to be writable for it to succeed; if it is
109+
not, the start still proceeds, with a warning, and `bin/castle unpack` will
110+
later refuse rather than upgrade a system that cannot record what it is
111+
running. Every start after the first does nothing at all. The hook is also
112+
where the provisional version marker left by a relup that restarts the
113+
emulator will be consumed. Any `env.sh` the project supplies through
114+
`rel/env.sh.eex` is preserved, and runs first.
109115
- The generated _name.rel_ is copied into the `releases` folder as _name-vsn.rel_,
110116
which is where `release_handler` looks for it when unpacking a tarball.
111117
- Any checked `relup` is written into the version path of the release.

0 commit comments

Comments
 (0)