- Clone this repo
- Install
asdf - Install language build dependencies:
brew install coreutils - Add
asdfplugins:asdf plugin add erlang asdf plugin add elixir asdf plugin add nodejs
- Install versions specified in
.tool-versionswithasdf install
- Install
direnv cp .envrc.template .envrc- Fill in
API_V3_KEYwith a V3 API key- If you haven't already, create a V3 API account using your work email, and use the portal to create an API key.
direnv allow
- Run
scripts/pull_configs.sh dev. This will save the current Screens and Signs-UI configuration stored on S3 to theprivdirectory, which is where the app expects to find this configuration when running locally.- This script uses the
awsCLI, so it assumes you have this installed and configured with working credentials, and that your AWS account has Screens team permissions. - Once you have the CLI installed, go to the console and then go to your
account and select "Security Credentials". Under "Access Keys" select
"Create access key" if you don't have one already. Use the access key id
and secret access key to auth in the CLI with the
aws configurecommand.
- This script uses the
mix deps.getnpm install --prefix assetsmix phx.server- Visit http://localhost:4000/v2/screen/PRE-101 (one of our screens, chosen arbitrarily) to check that everything is working!
In deployed environments, the app gets its configuration directly from S3, and the admin interface can write the configuration to S3 as well. To test or work on this functionality locally, you'll need an AWS access key.
The app will use a key stored in the environment variables AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY. These can be exported or saved in a .envrc as
with the V3 API key above, but for security reasons it is recommended to only
store them in 1Password. There are a few ways to make these available to
the app using the 1Password CLI, but one way is using an export command like
this (which works in .envrc):
export AWS_SECRET_ACCESS_KEY=$(op item get --vault VAULT_NAME ITEM_NAME --field FIELD_NAME)