Skip to content

Commit

Permalink
ENG-1569 Chore: Setup env variable files (#51)
Browse files Browse the repository at this point in the history
## Affected Packages

Apps

- [x] portal

Packages

- [x] 1ui
- [x] api
- [x] protocol
- [x] sdk

Tools

- [ ] tools

## Overview

Setups env variables file for each app/package. These variables will be
the source of truth for build time configurations for local, test, and
production. This will enable us to build the app in different
environments but all off the `main` branch.

`.env.example` is a shell of the 3 environment configurations and should
always have all the possible ENV variables. The 3 configurations are as
follows:

- `.env.local`
- `.env.test`
- `.env.production`

@jonathanprozzi would love your help with populating the `.env.example`
files with the relevant variables.

## Build time logic

<img width="923" alt="image"
src="https://github.com/0xIntuition/intuition-ts/assets/37151383/35d3b616-92b7-4f32-bfd1-613fa40f9575">

## Declaration

- [ ] I hereby declare that I have abided by the rules and regulations
as outlined in the
[CONTRIBUTING.md](https://github.com/0xIntuition/intuition-ts/blob/main/CONTRIBUTING.md)
  • Loading branch information
rahulr8 authored May 21, 2024
1 parent a746e52 commit fcfb923
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 1 deletion.
Empty file added .env.example
Empty file.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ out/
dist/

.nx/cache
packages/1ui/storybook-static
packages/1ui/storybook-static

.env*
!.env.example
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ Each package will have more detailed instructions, but you should clone the enti
- Clone the monorepo from the root: `[email protected]:0xIntuition/intuition-ts.git`
- Follow individual instructions for each app and package

### Environment variables

Please read [Nx's env variable definition guide](https://nx.dev/recipes/tips-n-tricks/define-environment-variables) to see how we organize our env variables. Each app/package will have the following files that reflects the three configurations we have.

- .env.local
- .env.test
- .env.production

## Contributing

Please read the [contributing guide](./CONTRIBUTING.md).
Empty file added packages/1ui/.env.example
Empty file.
Empty file added packages/api/.env.example
Empty file.
Empty file added packages/protocol/.env.example
Empty file.
Empty file added packages/sdk/.env.example
Empty file.

0 comments on commit fcfb923

Please sign in to comment.