From 1bf0f24a29c862b7f59bc3718d2dbfda92bc0d84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gra=C3=B1a?= Date: Tue, 26 Nov 2024 14:58:54 -0300 Subject: [PATCH 1/3] reference docs for [deploy.release_command_vm] --- reference/configuration.html.markerb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/reference/configuration.html.markerb b/reference/configuration.html.markerb index 67d1756fab..112f007049 100644 --- a/reference/configuration.html.markerb +++ b/reference/configuration.html.markerb @@ -184,6 +184,16 @@ The `release_command` value replaces `CMD` in the temporary Machine. This is use The temporary Machine has full access to the network, environment variables and secrets, but *not* to persistent volumes. Changes made to the file system on the temporary Machine will not be retained or deployed. The building/compiling of your project should be done in your Dockerfile. If you need to modify persistent volumes or configure your application, consider making use of `CMD` or `ENTRYPOINT` in your Dockerfile, or of a [process group command](#the-processes-section). The temporary Machine inherits the size from the largest Machine in the default process group of the app as of flyctl v0.0.508 (they also default larger on empty/new apps, using the Machine `shared-cpu-2x` preset). The default process group is defined as either the `app` process, or the first process group in alphabetical order (if an `app` process is not present). +It is possible to explicitly set the machine size by setting `[deploy.release_command_vm]` like in: + +```toml +[deploy] + release_command = "bin/rails db:prepare" + + [deploy.release_command_vm] + size = "performance-1x" + memory = "8gb" +``` A non-zero exit status from this command will stop the deployment. `fly deploy` will display logs from the command. Logs are available via `fly logs` as well. From e2b8d29ae880e632f6ec0005af57ffa6dce3c2bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gra=C3=B1a?= Date: Tue, 26 Nov 2024 15:00:46 -0300 Subject: [PATCH 2/3] linter fixes --- reference/configuration.html.markerb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/configuration.html.markerb b/reference/configuration.html.markerb index 112f007049..085cc98bd8 100644 --- a/reference/configuration.html.markerb +++ b/reference/configuration.html.markerb @@ -184,7 +184,7 @@ The `release_command` value replaces `CMD` in the temporary Machine. This is use The temporary Machine has full access to the network, environment variables and secrets, but *not* to persistent volumes. Changes made to the file system on the temporary Machine will not be retained or deployed. The building/compiling of your project should be done in your Dockerfile. If you need to modify persistent volumes or configure your application, consider making use of `CMD` or `ENTRYPOINT` in your Dockerfile, or of a [process group command](#the-processes-section). The temporary Machine inherits the size from the largest Machine in the default process group of the app as of flyctl v0.0.508 (they also default larger on empty/new apps, using the Machine `shared-cpu-2x` preset). The default process group is defined as either the `app` process, or the first process group in alphabetical order (if an `app` process is not present). -It is possible to explicitly set the machine size by setting `[deploy.release_command_vm]` like in: +It is possible to explicitly set the Machine size by setting `[deploy.release_command_vm]` like in: ```toml [deploy] From 197db43457ec89561cacdc1fa913f1f3f09bb2ba Mon Sep 17 00:00:00 2001 From: Roadmaster Date: Wed, 27 Nov 2024 16:19:21 -0500 Subject: [PATCH 3/3] Update configuration.html.markerb minor phrasing updates --- reference/configuration.html.markerb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/configuration.html.markerb b/reference/configuration.html.markerb index 085cc98bd8..e8d0cc061a 100644 --- a/reference/configuration.html.markerb +++ b/reference/configuration.html.markerb @@ -181,10 +181,10 @@ To run a command in a temporary Machine—using the app's successfully built The `release_command` value replaces `CMD` in the temporary Machine. This is useful for running database migrations before app Machines are created or updated with the new release. Note that the Docker image's `ENTRYPOINT` is not overridden by the `release_command`; `ENTRYPOINT` always runs. -The temporary Machine has full access to the network, environment variables and secrets, but *not* to persistent volumes. Changes made to the file system on the temporary Machine will not be retained or deployed. The building/compiling of your project should be done in your Dockerfile. If you need to modify persistent volumes or configure your application, consider making use of `CMD` or `ENTRYPOINT` in your Dockerfile, or of a [process group command](#the-processes-section). +By default, the temporary Machine has full access to the network, environment variables and secrets, but *not* to persistent volumes. Changes made to the file system on the temporary Machine will not be retained or deployed. The building/compiling of your project should be done in your Dockerfile. If you need to modify persistent volumes or configure your application, consider making use of `CMD` or `ENTRYPOINT` in your Dockerfile, or of a [process group command](#the-processes-section). The temporary Machine inherits the size from the largest Machine in the default process group of the app as of flyctl v0.0.508 (they also default larger on empty/new apps, using the Machine `shared-cpu-2x` preset). The default process group is defined as either the `app` process, or the first process group in alphabetical order (if an `app` process is not present). -It is possible to explicitly set the Machine size by setting `[deploy.release_command_vm]` like in: +It is also possible to explicitly define the Machine size by setting `[deploy.release_command_vm]` like in: ```toml [deploy]