Configure Secrets in Seed
Before we can make our first deployment, we need to make sure to configure our secret environment variables. If you’ll recall, we have explicitly not stored these in our code (or in Git). This means that if somebody else on our team needs to deploy, we’ll need to pass the
.env.local file around. Instead we’ll configure Seed to deploy with our secrets for us.
We are also going to configure Seed to deploy our app to production when we push any changes to the
By default, Seed sets you up with two environments,
prod. Where pushing to the
main branch would deploy to
dev. And you’ll need to promote your changes to
prod. To keep things simple, we are only going to use the
prod stage here and deploy directly to it.
To configure the above, click dev in your app Settings.
Here turn off the Auto-deploy setting.
Then head over to the prod stage in your app Settings.
Here turn on the Auto-deploy setting.
You’ll be prompted to select a branch. Select main and click Enable.
Next, scroll down and click Show Env Variables.
And type in
STRIPE_SECRET_KEY as the Key. We saved this in a
.env.local file in our project root back from the Handling Secrets in SST chapter. Hit Add to save your secret key.
Next, we’ll trigger our first deployment on Seed.
For help and discussionComments on this chapter