Skip to content

Commit

Permalink
Merge pull request #155 from cdoremus/add-deployment-id-env
Browse files Browse the repository at this point in the history
  • Loading branch information
iuioiua authored May 7, 2023
2 parents 9662c76 + e180b16 commit 611716d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .example.env
Original file line number Diff line number Diff line change
Expand Up @@ -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

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 }}
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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
Expand Down

0 comments on commit 611716d

Please sign in to comment.