Skip to content

Commit

Permalink
Production secrets will be in DO for now
Browse files Browse the repository at this point in the history
  • Loading branch information
neongreen committed Aug 6, 2023
1 parent 213e230 commit 0ed4008
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 23 deletions.
20 changes: 0 additions & 20 deletions .env.production.enc

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/export.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:

- name: Use .env.development
# NB: copying instead of symlinking due to https://github.com/vercel/next.js/issues/53086
# NB 2: we don't decrypt secrets here on purpose — don't want them to potentially leak out in PR build logs
run: cp .env.development .env

- name: Install dependencies
Expand Down
7 changes: 4 additions & 3 deletions docs/secrets.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

## Overview

Most values in `.env.development` and `.env.production` aren't secret. The ones that are secret, live in `*.enc` files encrypted with Sops.
Most values in `.env.development` aren't secret. The ones that are secret, live in `*.enc` files encrypted with Sops.

Some features (eg. Beeminder integration) can only be tested in development mode if you have access to secrets. However, the app should remain runnable in development even without secrets.

The primary reason for using Sops is that eg. development secrets don't belong in DigitalOcean, but they should live somewhere instead of being copied between developers' machines. So we use Sops. Secrets that relate to DigitalOcean infrastructure, like database passwords, live in DigitalOcean settings; else is in Sops.
The primary reason for using Sops is that eg. development secrets don't belong in DigitalOcean, but they should live somewhere instead of being copied between developers' machines. So we use Sops.

Production secrets still live in DigitalOcean because there is no particularly easy way to add Sops to the DigitalOcean app builder.

## Setting up sops

Expand All @@ -27,7 +29,6 @@ age-keygen -o "$HOME/Library/Application Support/sops/age/keys.txt"

```bash
sops --encrypt --in-place .env.development.enc
sops --encrypt --in-place .env.production.enc
```

## Editing encrypted files
Expand Down

0 comments on commit 0ed4008

Please sign in to comment.