- Clone this repo
- Install
asdf
- Install language build dependencies:
brew install coreutils
- Add
asdf
plugins:asdf plugin-add erlang
asdf plugin-add elixir
asdf plugin-add nodejs
- Install versions specified in
.tool-versions
withasdf install
- Install
direnv
cp .envrc.template .envrc
- Fill in
API_V3_KEY
with 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 thepriv
directory, which is where the app expects to find this configuration when running locally.- This script uses the
aws
CLI, so it assumes you have this installed and configured with working credentials, and that your AWS account has Screens team permissions. If you don't have all this completely set up but do have S3 access through the AWS web console, you can get the files from there, referring to the script to see what to copy and where to save it. Or, ask the team if someone can send you their files!
- This script uses the
mix deps.get
npm install --prefix assets
mix 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)