diff --git a/.example.env b/.example.env index eaf2e252e..cff89aa26 100644 --- a/.example.env +++ b/.example.env @@ -3,4 +3,10 @@ SUPABASE_API_URL=http://localhost:54321 STRIPE_SECRET_KEY=sk_test_xxx STRIPE_WEBHOOK_SECRET=xxx -STRIPE_PREMIUM_PLAN_PRICE_ID=xxx \ No newline at end of file + +STRIPE_PREMIUM_PLAN_PRICE_ID=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 }} diff --git a/README.md b/README.md index 339d00dd7..f48091a74 100644 --- a/README.md +++ b/README.md @@ -246,6 +246,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} @@ -255,6 +256,18 @@ services: - "8000:8000" ``` +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 +``` + ### Automatic Deployment with Deno Deploy These steps show you how to deploy your SaaS app close to your users at the edge