Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #254

Merged
merged 1 commit into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
PORT=3000
GOVUK_NOTIFY_API_KEY=
GOVUK_NOTIFY_APPLICATION_SUBMITTED_TEMPLATE_ID=
GOVUK_NOTIFY_GENERIC_EMAIL_TEMPLATE_ID=
AZURE_CLIENT_ID=
AZURE_CLIENT_SECRET=
Expand Down
61 changes: 46 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,30 @@ When the versions are updated on the `main` branch run `asdf install` again to u
installation. Use `asdf plugin update --all` to update plugins and get access to
newer versions of tools.

## Setting up the app in development
Create your `.env` from the `.env.example` template
* GOVUK_NOTIFY_API_KEY, using the citest api key
* GOVUK_NOTIFY_GENERIC_EMAIL_TEMPLATE_ID, template id used by mail-notify
* AZURE_CLIENT_ID, to access application platform
* AZURE_CLIENT_SECRET
* AZURE_TENANT_ID
* REDIS_URL, redis url for sidekiq
* LOCAL_USER_EMAIL, your education.gov.uk email address to access the system_admin section

### Manual development setup

1. Run `bundle install` to install the gem dependencies
2. Run `yarn` to install node dependencies
3. Run `bin/rails db:setup` to set up the database development and test schemas
4. Run `bundle exec rails server` to launch the app on <http://localhost:3000>
5. Run `./bin/webpack-dev-server` in a separate shell for faster compilation of assets
4. Run `bundle exec foreman start -f Procfile.dev` to launch the app on <http://localhost:3000>


### Docker based development setup
1. Run `tilt up -- --local-app` to launch the app on <http://localhost:3000>

You can also run `tilt up` that way you will be building the image definied by the Dockerfile

## Setup using Tilt
To have a development environment setup quickly with all the dependencies you can use [Tilt](https://tilt.dev/).
1. Create your local `.env` file from `.env.example`
2. Update your local `.env` with relevant information
3. Add your education.gov.uk email address to `LOCAL_USER_EMAIL` in `.env`
4. Run `tilt up` to start the server
This option will start the application and run the `db/seed.rb` file.

For development convenience you should use `tilt up -- --local-app`

## Running specs

Expand All @@ -66,6 +73,34 @@ Run the full test suite with:
bundle exec rake
```


## Platform

You need to request `digitalauth.education.gov.uk` account before being able to access a deployed
instance.
Once your account active you need to request your temporary access token at
[portal.azure.com](https://portal.azure.com/#view/Microsoft_Azure_PIMCommon/ActivationMenuBlade/~/azurerbac)

The following environment are available on the platform:
* qa
* review, deployed on demand by adding the `deploy` label on a PR
* staging
* production


### Environment variables

When adding / removing or editing along side the code changes you will need to update the all the
available environments.
Run the following command `make <environment> edit-app-secrets`


### SSH access

Access a deploy with the command `make <environment> ssh`.



## Architectural Decision Record

See the [docs/adr](docs/adr) directory for a list of the Architectural Decision
Expand All @@ -82,8 +117,4 @@ adr new "Title of ADR"
### Contingency
This service does not offer any out of hours SLAs and there will be not on call shift.

Any incidents observed should follow [the incident reporting guidance](https://tech-docs.teacherservices.cloud/operating-a-service/incident-playbook.html)

### Hosting

TODO
Any incidents observed should follow [the incident reporting guidance](https://tech-docs.teacherservices.cloud/operating-a-service/incident-playbook.html)