You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You need to keep `.env` files in sync between machines, environments, or team members? Use [dotenvx](https://github.com/dotenvx/dotenvx) to encrypt your `.env` files and safely include them in source control. This still subscribes to the twelve-factor app rules by generating a decryption key separate from code.
230
+
<details><summary>Encryption</summary><br>
231
+
232
+
Use [dotenvx](https://github.com/dotenvx/dotenvx).
233
+
234
+
Add encryption to your `.env` files with a single command. Pass the `--encrypt` flag.
235
+
236
+
```
237
+
$ dotenvx set HELLO Production --encrypt -f .env.production
You need to deploy your secrets in a cloud-agnostic manner? Use [dotenvx](https://github.com/dotenvx/dotenvx) to generate a private decryption key that is set on your production server.
281
+
<details><summary>Production</summary><br>
270
282
271
-
283
+
Use [dotenvx](https://github.com/dotenvx/dotenvx)
272
284
273
-
</details>
285
+
Create a `.env.production` file.
274
286
275
-
287
+
```sh
288
+
$ echo"HELLO=production"> .env.production
289
+
```
276
290
277
-
## Deploying
291
+
Encrypt it.
278
292
279
-
Use [dotenvx](https://github.com/dotenvx/dotenvx).
293
+
```sh
294
+
$ dotenvx encrypt -f .env.production
295
+
```
280
296
281
-
Add encryption to your`.env` files with a single command. Pass the `--encrypt` flag.
297
+
Set `DOTENV_PRIVATE_KEY_PRODUCTION` (found in`.env.keys`) on your server.
282
298
283
299
```
284
-
$ dotenvx set HELLO Production --encrypt -f .env.production
You need to keep `.env` files in sync between machines, environments, or team members? Use [dotenvx](https://github.com/dotenvx/dotenvx) to encrypt your `.env` files and safely include them in source control. This still subscribes to the twelve-factor app rules by generating a decryption key separate from code.
0 commit comments