Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f39aa43

Browse files
committed
Document SYMFONY_CACHE_DIR
1 parent f3da464 commit f39aa43

File tree

2 files changed

+32
-5
lines changed

2 files changed

+32
-5
lines changed

config.rst

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -397,17 +397,27 @@ Three hooks are available:
397397
* First, the **build** script runs when SymfonyCloud packages the application.
398398
At this time, the application source code is checked out, global
399399
`dependencies`_ are installed and the filesystem can be written at will but no
400-
:doc:`services </services/intro>` are available. This is the best time to run
401-
heavy-duty tasks that can be performed offline such as assets build or Symfony
402-
container compilation.
400+
:doc:`services </services/intro>` are available.
403401

404402
.. caution::
405403

406-
The *build* step creates a container image that is tied to the sha1 of
407-
the Git tree being built. This image is reused for all deployments and all
404+
The *build* step creates a container image that is tied to the Git tree
405+
content being built. This image is reused for all deployments and all
408406
environments, including production. This means that the build step **must**
409407
be environment agnostic.
410408

409+
This is the best time to run heavy-duty tasks that can be performed offline
410+
such as assets build or Symfony container compilation. A persisted :ref:`build
411+
cache directory <build_cache_dir>` is available to you for storing reusable
412+
artifacts. ``/tmp`` is also writable but its content is wiped after the build.
413+
414+
.. note::
415+
416+
Build environments (the application plus the cache directory) are limited to
417+
4 GB during the build step - independently of the mounted disk size that is
418+
allocated for deployment. If you exceed this limit you will receive a ``No
419+
space left on device error``.
420+
411421
.. _deploy-hook:
412422

413423
* Then, the **deploy** script runs when SymfonyCloud is deploying the

cookbooks/env.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,23 @@ prefixed with ``SYMFONY_*``:
162162
* ``SYMFONY_PROJECT_ENTROPY``: A random value created when the project is
163163
first created, which is then stable throughout the project’s life.
164164

165+
The following variables exist **only** during the build. If used at runtime they
166+
will evaluate to an empty string like any other unset variable:
167+
168+
.. _build_cache_dir:
169+
170+
* ``SYMFONY_CACHE_DIR``: The absolute path to the build cache directory
171+
available during the :ref:`build hook <build-hook>` execution.
172+
173+
This directory is persisted between builds, but is **not** deployed. It’s a
174+
good place to store build artifacts, such as downloaded files, that can be
175+
reused between builds.
176+
177+
.. note::
178+
179+
This directory is shared by **all** builds on **all** branches, make sure
180+
your build hook accounts for that.
181+
165182
The following variables exist **only** at runtime. If used in a build hook they
166183
will evaluate to an empty string like any other unset variable:
167184

0 commit comments

Comments
 (0)