diff --git a/docs/configuration/choose-and-configure-docker-stack.md b/docs/configuration/choose-and-configure-docker-stack.md index ecd9e4d6..78bc1215 100644 --- a/docs/configuration/choose-and-configure-docker-stack.md +++ b/docs/configuration/choose-and-configure-docker-stack.md @@ -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: diff --git a/docs/sample_env_files/local/.django b/docs/sample_env_files/backend/local/.django similarity index 100% rename from docs/sample_env_files/local/.django rename to docs/sample_env_files/backend/local/.django diff --git a/docs/sample_env_files/local/.gremlinengine b/docs/sample_env_files/backend/local/.gremlinengine similarity index 100% rename from docs/sample_env_files/local/.gremlinengine rename to docs/sample_env_files/backend/local/.gremlinengine diff --git a/docs/sample_env_files/local/.gremlinengine.postgres b/docs/sample_env_files/backend/local/.gremlinengine.postgres similarity index 100% rename from docs/sample_env_files/local/.gremlinengine.postgres rename to docs/sample_env_files/backend/local/.gremlinengine.postgres diff --git a/docs/sample_env_files/local/.postgres b/docs/sample_env_files/backend/local/.postgres similarity index 100% rename from docs/sample_env_files/local/.postgres rename to docs/sample_env_files/backend/local/.postgres diff --git a/docs/sample_env_files/production/.django b/docs/sample_env_files/backend/production/.django similarity index 100% rename from docs/sample_env_files/production/.django rename to docs/sample_env_files/backend/production/.django diff --git a/docs/sample_env_files/production/.frontend b/docs/sample_env_files/backend/production/.frontend similarity index 100% rename from docs/sample_env_files/production/.frontend rename to docs/sample_env_files/backend/production/.frontend diff --git a/docs/sample_env_files/production/.gremlinengine b/docs/sample_env_files/backend/production/.gremlinengine similarity index 100% rename from docs/sample_env_files/production/.gremlinengine rename to docs/sample_env_files/backend/production/.gremlinengine diff --git a/docs/sample_env_files/production/.gremlinengine.postgres b/docs/sample_env_files/backend/production/.gremlinengine.postgres similarity index 100% rename from docs/sample_env_files/production/.gremlinengine.postgres rename to docs/sample_env_files/backend/production/.gremlinengine.postgres diff --git a/docs/sample_env_files/production/.postgres b/docs/sample_env_files/backend/production/.postgres similarity index 100% rename from docs/sample_env_files/production/.postgres rename to docs/sample_env_files/backend/production/.postgres diff --git a/docs/sample_env_files/frontend/local/django.auth.env b/docs/sample_env_files/frontend/local/django.auth.env new file mode 100644 index 00000000..2240244f --- /dev/null +++ b/docs/sample_env_files/frontend/local/django.auth.env @@ -0,0 +1,3 @@ +REACT_APP_USE_AUTH0=false +REACT_APP_USE_ANALYZERS=true +REACT_APP_ALLOW_IMPORTS=true diff --git a/docs/sample_env_files/frontend/local/with.auth0.env b/docs/sample_env_files/frontend/local/with.auth0.env new file mode 100644 index 00000000..36454abf --- /dev/null +++ b/docs/sample_env_files/frontend/local/with.auth0.env @@ -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 diff --git a/docs/sample_env_files/frontend/production/django.auth.env b/docs/sample_env_files/frontend/production/django.auth.env new file mode 100644 index 00000000..2240244f --- /dev/null +++ b/docs/sample_env_files/frontend/production/django.auth.env @@ -0,0 +1,3 @@ +REACT_APP_USE_AUTH0=false +REACT_APP_USE_ANALYZERS=true +REACT_APP_ALLOW_IMPORTS=true diff --git a/docs/sample_env_files/frontend/production/with.auth0.env b/docs/sample_env_files/frontend/production/with.auth0.env new file mode 100644 index 00000000..0ae8c151 --- /dev/null +++ b/docs/sample_env_files/frontend/production/with.auth0.env @@ -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