From 6efd78d6085a80fe44db23e1add5d921e6880d5f Mon Sep 17 00:00:00 2001 From: Craig Doremus Date: Wed, 3 May 2023 18:19:22 -0400 Subject: [PATCH 1/4] Added DENO_DEPLOYMENT_ID env var --- .example.env | 7 ++++++- README.md | 17 +++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/.example.env b/.example.env index df6ae93fd..7cbb6c7f0 100644 --- a/.example.env +++ b/.example.env @@ -2,4 +2,9 @@ SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZ SUPABASE_API_URL=http://localhost:54321 STRIPE_SECRET_KEY=sk_test_xxx -STRIPE_WEBHOOK_SECRET=xxx \ No newline at end of file +STRIPE_WEBHOOK_SECRET=xxx + +# Only used for Docker deployments +# Update before a new docker compose build is done +# Value is result of 'git rev-parse' command +DENO_DEPLOYMENT_ID={{ git rev-parse HEAD }} \ No newline at end of file diff --git a/README.md b/README.md index 135edebef..cd8e1cbd3 100644 --- a/README.md +++ b/README.md @@ -237,6 +237,7 @@ services: container_name: deno-sasskit image: deno-image environment: + - DENO_DEPLOYMENT_ID=${DENO_DEPLOYMENT_ID} - SUPABASE_ANON_KEY=${SUPABASE_ANON_KEY} - SUPABASE_API_URL=${SUPABASE_API_URL} - STRIPE_SECRET_KEY=${STRIPE_SECRET_KEY} @@ -245,6 +246,22 @@ services: - "8000:8000" ``` +The environmental variable values are pulled from the `.env` file. + +The `DENO_DEPLOYMENT_ID` variable is needed for Docker deployment of a Deno +Fresh app for caching to work properly. Its value needs to be a token reflecting +the build that you will be deploying. The SHA1 commit hash is a suitable token +that can be obtained from the following command run in the repo's root folder. +Copy its results into the value of `DENO_DEPLOYMENT_ID`. Make sure you update +this value every time you run a new docker compose build. + +```sh +# get the SHA1 commit hash of the current branch +git rev-parse HEAD +``` + +Make sure this command is run and value upgraded + ### Automatic Deployment with Deno Deploy These steps show you how to deploy your SaaS app close to your users at the edge From a28e5b796a99debe5e33ca52adbd06effad263cb Mon Sep 17 00:00:00 2001 From: Craig Doremus <942174+cdoremus@users.noreply.github.com> Date: Thu, 4 May 2023 17:35:55 -0400 Subject: [PATCH 2/4] Small edit suggested by Andy Co-authored-by: Andy Jiang --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 404aa2aed..8b7611ee6 100644 --- a/README.md +++ b/README.md @@ -251,7 +251,7 @@ services: - "8000:8000" ``` -The environmental variable values are pulled from the `.env` file. +The values of the environmental variables are pulled from the `.env` file. The `DENO_DEPLOYMENT_ID` variable is needed for Docker deployment of a Deno Fresh app for caching to work properly. Its value needs to be a token reflecting From d954ffbed3fcc914be1b6070953c901d20c75fcc Mon Sep 17 00:00:00 2001 From: Craig Doremus <942174+cdoremus@users.noreply.github.com> Date: Thu, 4 May 2023 23:22:02 -0400 Subject: [PATCH 3/4] Edits suggested by Andy Co-authored-by: Andy Jiang --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index fb363dca8..26716c815 100644 --- a/README.md +++ b/README.md @@ -259,11 +259,11 @@ services: The values of the environmental variables are pulled from the `.env` file. The `DENO_DEPLOYMENT_ID` variable is needed for Docker deployment of a Deno -Fresh app for caching to work properly. Its value needs to be a token reflecting -the build that you will be deploying. The SHA1 commit hash is a suitable token -that can be obtained from the following command run in the repo's root folder. -Copy its results into the value of `DENO_DEPLOYMENT_ID`. Make sure you update -this value every time you run a new docker compose build. +Fresh app for caching to work properly. Its value needs to be a unique id tied to the deployment. We recommend using the SHA1 commit hash, which can be obtained from the following command run in the repo's root folder: + +```sh +# get the SHA1 commit hash of the current branch +git rev-parse HEAD ```sh # get the SHA1 commit hash of the current branch From e180b1678239cea0e0c52e744131a82a36e69807 Mon Sep 17 00:00:00 2001 From: Craig Doremus Date: Fri, 5 May 2023 12:34:30 -0400 Subject: [PATCH 4/4] Edits suggested by Andy; Ran deno fmt --- README.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 26716c815..f48091a74 100644 --- a/README.md +++ b/README.md @@ -259,19 +259,15 @@ services: The values of the environmental variables are pulled from the `.env` file. The `DENO_DEPLOYMENT_ID` variable is needed for Docker deployment of a Deno -Fresh app for caching to work properly. Its value needs to be a unique id tied to the deployment. We recommend using the SHA1 commit hash, which can be obtained from the following command run in the repo's root folder: - -```sh -# get the SHA1 commit hash of the current branch -git rev-parse HEAD +Fresh app for caching to work properly. Its value needs to be a unique id tied +to the deployment. We recommend using the SHA1 commit hash, which can be +obtained from the following command run in the repo's root folder: ```sh # get the SHA1 commit hash of the current branch git rev-parse HEAD ``` -Make sure this command is run and value upgraded - ### Automatic Deployment with Deno Deploy These steps show you how to deploy your SaaS app close to your users at the edge