The snapshot
Before it starts instances, a deploy fixes all that they run with and saves it as a snapshot.
The deploy fixes the environment, the port, the command, the disk, the image and the limits.
Instances start only from the snapshot of a live deploy. Thus a change of settings, limits or variables applies only through a new deploy or a restart, as on Render.
A deploy that failed because of a bad change cannot break the self-healing of the live version. For the user view, see Settings and the live deploy.
What is in the snapshot
| Part | Value |
|---|---|
| Environment | The variables of the service and of its env groups, merged. Each reference has its real value. Ferry adds PORT and FERRY_*. |
| Port | For services that listen. See The port of your app for the order of the choice. |
| Command, disk, image | As the deploy found them. |
| Resource limits | The memory and CPU limits of the service, if it sets them. If not, the snapshot has none. |
==> Using port 80 (service setting)The engine uses the first value that it finds:
- The
portsetting of the service. - A
PORTvariable. - The port from the build: 80 for static sites.
- The one port that the image exposes.
--default-port(10000).
A snapshot with no limits gets the defaults of ferryd (--default-memory-limit, --default-cpu-limit). The engine applies them when it creates each container.
This is the one exception to the rule. After a change of these options, the replaced instances and the job runs of such a service get the new defaults.