Skip to content

Commit

Permalink
Merge pull request #11 from JSv4/JSv4/update-docs
Browse files Browse the repository at this point in the history
Added frontend .env file samples and guidance.
  • Loading branch information
JSv4 committed Oct 24, 2022
2 parents 5c0fac1 + 5aab32f commit a1aedb5
Show file tree
Hide file tree
Showing 14 changed files with 36 additions and 2 deletions.
18 changes: 16 additions & 2 deletions docs/configuration/choose-and-configure-docker-stack.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,24 @@ A "local" deployment is deployed on your personal computer and is not meant to b
don't need to configure anything, just follow the quick start guide above to get up and running with a local deployment
without needing any further configuration.

#### Customize Settings
#### Setup .env Files

##### Backend

After cloning this repo to a machine of your choice, create a folder for your environment
files in the repo root. You'll need `./.envs/.local/.django` and `./.envs/.local/.postgres` Use the samples in `./documentation/sample_env_files/local` as guidance. NOTE, you'll need to replace the placeholder passwords and users where noted, but, otherwise, minimal config should be required.
files in the repo root. You'll need `./.envs/.local/.django` and `./.envs/.local/.postgres`
Use the samples in `./documentation/sample_env_files/local` as guidance.
NOTE, you'll need to replace the placeholder passwords and users where noted, but, otherwise, minimal config should be
required.

##### Frontend

In the `./frontend` folder, you also need to create a single .env file which holds your configurations for your login
method as well as certain feature switches (e.g. turn off imports). We've included a sample using auth0 and
another sample using django's auth backend. Local vs production deployments are essentially the same, but the root
url of the backend will change from localhost to whereever you're hosting the application in production.

#### Build the Stack

Once your .env files are setup, build the stack using docker-compose:

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions docs/sample_env_files/frontend/local/django.auth.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
REACT_APP_USE_AUTH0=false
REACT_APP_USE_ANALYZERS=true
REACT_APP_ALLOW_IMPORTS=true
7 changes: 7 additions & 0 deletions docs/sample_env_files/frontend/local/with.auth0.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
REACT_APP_APPLICATION_DOMAIN=
REACT_APP_APPLICATION_CLIENT_ID=
REACT_APP_AUDIENCE=http://localhost:3000
REACT_APP_API_ROOT_URL=http://localhost:8000
REACT_APP_USE_AUTH0=true
REACT_APP_USE_ANALYZERS=true
REACT_APP_ALLOW_IMPORTS=true
3 changes: 3 additions & 0 deletions docs/sample_env_files/frontend/production/django.auth.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
REACT_APP_USE_AUTH0=false
REACT_APP_USE_ANALYZERS=true
REACT_APP_ALLOW_IMPORTS=true
7 changes: 7 additions & 0 deletions docs/sample_env_files/frontend/production/with.auth0.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
REACT_APP_APPLICATION_DOMAIN=
REACT_APP_APPLICATION_CLIENT_ID=
REACT_APP_AUDIENCE=http://localhost:3000
REACT_APP_API_ROOT_URL=[your open contracts backend url]
REACT_APP_USE_AUTH0=true
REACT_APP_USE_ANALYZERS=true
REACT_APP_ALLOW_IMPORTS=true

0 comments on commit a1aedb5

Please sign in to comment.