Skip to content

communitiesuk/ukraine-sponsor-resettlement

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ukraine Sponsor Resettlement

This is the codebase for the Ruby on Rails app that will handles the submission of sponsorship requests.

Table of Contents

Deployment Pipeline

Deployment Pipeline

System Context Diagram

The, C4 system context diagram is intended to show, at the highest level, the key users and interactions in the system.

C4 Context diagram

Container Diagram

The, C4 container diagram is intended to zoom in from the system boundary, at the highest level, to provide further detail for the technical audience.

C4 Container diagram

Component Diagram

The, C4 Component diagram is intended to zoom in from the system boundary, at the highest level, to provide further detail for the technical audience.

C4 Component diagram

Monitoring

Alerting

Alerts are configured in Grafana and push to the following destinations:

  • #homes-for-ukraine-alerts, DLUHC managed Slack channel
  • PagerDuty, MadeTech managed instance.
  • Email to the team. (Find the email address defined in the grafana alerts)

Related Repositories

Development

Pre-requisites

  • Docker

Getting started

Run: make run

In case of any error, run these two commands before make run: bundle exec rake webpacker:install bundle exec rails assets:precompile

The Rails server should start on http://localhost:8080

Either visit http://localhost:8080/sponsor-a-child/ or http://localhost:8080/expression-of-interest/

Running tests

Unit tests

Run: make test

NB: This builds a Docker image and sets up an environment for running tests depending on PostgresQL, Redis and S3. The container will be destroyed when the tests complete, which means that the coverage report will be lost.

If you want the coverage report, you can keep the container alive by editing /bin/test.sh to do

RAILS_ENV=test rake db:prepare && rake db:migrate && rake && tail -f /dev/null

instead of terminating when the rake task which runs the tests has finished. (tail -f /dev/null is a benign way of keeping the container active).

When the tests have completed you can copy the coverage report to your docker host's local filesystem by doing

docker cp <container ID or name>:/app/coverage <destination path on host>

on the host. For example, to copy to the coverage report to the current working directory on the host:

docker cp ukraine-sponsor-resettlement-test-1:/app/coverage .

You can then terminate the testing container with ctrl-c.

Running Automated tests (End to End tests)

This repository features automated tests run through Cypress. Setup and instructions can be found here

Database migrations

Database migrations are required to make changes to the database

rails generate migration <name of migration>

This will create a file in the db/migrate folder and this file can be amended to reflect the change required.

Infrastructure

This application is running on Amazon Web Services (https://aws.amazon.com/console/).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published