Postgres running locally with a user/password of 'postgres'/'postgres' e.g. using docker :
docker run --name postgres -v pgdata:/var/lib/postgresql/data -p 5432:5432 -d postgres --password -e POSTGRES_PASSWORD=postgres
Running the application
You will need to create a new OAuth application on Github and provide it's
CLIENT_SECRET values to the release_admin application.
The steps involved are as follows :
## Create github application
Create a new github application via the github.com/settings/applications/new
For testing purposes we've chosen the following values, the only important value is the callback url, which is where OAuth requests will be redirected to:
Having created the application, you will be given the opportunity to copy the GITHUB_CLIENT_ID, and GITHUB_CLIENT_SECRET - Github offers the option to regenerate the secret later if need be.
Export environmental variables
Export these environmnental variables into the environment in which you will run the 'release_admin' application:
export GITHUB_CLIENT_ID=<GITHUB_CLIENT_ID> export GITHUB_CLIENT_SECRET=<GITHUB_CLIENT_SECRET>
Generate and export storage crypto key
You will need to generate a random encryption key to prevent credentials being stolen from database backups, etc (data at rest). You can do so using the following code.
iex(2)> 32 |> :crypto.strong_rand_bytes() |> Base.encode64 "VdEdsw4VChhQuVQkLxZ/BVbZ/Eayo7qThpxw2g3DKuA="
Once you have done so, you will need to expose the base64 value as the environmental variable
- Install Elixir dependencies with
- Create and migrate the database with
mix ecto.create && mix ecto.migrate
- Install Node.js dependencies with
cd assets && npm install
- Start Phoenix endpoint with
iex --name firstname.lastname@example.org --cookie secret -S mix phx.server
Log in and follow the auth process
Navigate to the authorization screen and follow the authorization process.
This application will ask for the following (read only) privileges :