From e15b0572364517e5b9f82b92de8940afdf73787d Mon Sep 17 00:00:00 2001 From: Nattfarinn Date: Mon, 9 Jan 2023 13:04:28 +0100 Subject: [PATCH] IBX-3767: Document how to use fastly CLI on post deploy hook --- .../platformsh/ibexa-content/4.3.x-dev/.platform.app.yaml | 5 +++++ resources/platformsh/ibexa-content/4.3/.platform.app.yaml | 5 +++++ .../platformsh/ibexa-experience/4.3.x-dev/.platform.app.yaml | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/resources/platformsh/ibexa-content/4.3.x-dev/.platform.app.yaml b/resources/platformsh/ibexa-content/4.3.x-dev/.platform.app.yaml index 7926f63..22dd096 100644 --- a/resources/platformsh/ibexa-content/4.3.x-dev/.platform.app.yaml +++ b/resources/platformsh/ibexa-content/4.3.x-dev/.platform.app.yaml @@ -210,6 +210,11 @@ hooks: # Depending on your VCL, buy default this would trigger a soft purge (expiry) and allow grace period, however # even so if your change only affected certain subset of content, ideally you should only clear specific tags: ##bin/console fos:httpcache:invalidate:tag l44 c33 ct2 ... + + # It is possible to manipulate your Fastly VCL configuration directly from command line using Fastly CLI. + # Official documentation on how to install: https://developer.fastly.com/learning/tools/cli#installing + # Example VCL snippet upload using vcl_recv hook (remember about FASTLY_SERVICE_ID and FASTLY_KEY environmental variables): + ##fastly vcl snippet create --name="Enable Fastly IO" --version=active --autoclone --type recv --content=vendor/ibexa/fastly/fastly/ibexa_image_optimizer.vcl # Post deploy hook, like deploy but after being deployed and live, for deploy tasks we can do asynchronously # Tip: As this is running while web is running, and it's async, avoid doing anything like cache clearing that affects web requests here. diff --git a/resources/platformsh/ibexa-content/4.3/.platform.app.yaml b/resources/platformsh/ibexa-content/4.3/.platform.app.yaml index 7926f63..22dd096 100644 --- a/resources/platformsh/ibexa-content/4.3/.platform.app.yaml +++ b/resources/platformsh/ibexa-content/4.3/.platform.app.yaml @@ -210,6 +210,11 @@ hooks: # Depending on your VCL, buy default this would trigger a soft purge (expiry) and allow grace period, however # even so if your change only affected certain subset of content, ideally you should only clear specific tags: ##bin/console fos:httpcache:invalidate:tag l44 c33 ct2 ... + + # It is possible to manipulate your Fastly VCL configuration directly from command line using Fastly CLI. + # Official documentation on how to install: https://developer.fastly.com/learning/tools/cli#installing + # Example VCL snippet upload using vcl_recv hook (remember about FASTLY_SERVICE_ID and FASTLY_KEY environmental variables): + ##fastly vcl snippet create --name="Enable Fastly IO" --version=active --autoclone --type recv --content=vendor/ibexa/fastly/fastly/ibexa_image_optimizer.vcl # Post deploy hook, like deploy but after being deployed and live, for deploy tasks we can do asynchronously # Tip: As this is running while web is running, and it's async, avoid doing anything like cache clearing that affects web requests here. diff --git a/resources/platformsh/ibexa-experience/4.3.x-dev/.platform.app.yaml b/resources/platformsh/ibexa-experience/4.3.x-dev/.platform.app.yaml index 7926f63..22dd096 100644 --- a/resources/platformsh/ibexa-experience/4.3.x-dev/.platform.app.yaml +++ b/resources/platformsh/ibexa-experience/4.3.x-dev/.platform.app.yaml @@ -210,6 +210,11 @@ hooks: # Depending on your VCL, buy default this would trigger a soft purge (expiry) and allow grace period, however # even so if your change only affected certain subset of content, ideally you should only clear specific tags: ##bin/console fos:httpcache:invalidate:tag l44 c33 ct2 ... + + # It is possible to manipulate your Fastly VCL configuration directly from command line using Fastly CLI. + # Official documentation on how to install: https://developer.fastly.com/learning/tools/cli#installing + # Example VCL snippet upload using vcl_recv hook (remember about FASTLY_SERVICE_ID and FASTLY_KEY environmental variables): + ##fastly vcl snippet create --name="Enable Fastly IO" --version=active --autoclone --type recv --content=vendor/ibexa/fastly/fastly/ibexa_image_optimizer.vcl # Post deploy hook, like deploy but after being deployed and live, for deploy tasks we can do asynchronously # Tip: As this is running while web is running, and it's async, avoid doing anything like cache clearing that affects web requests here.