Giter Club home page Giter Club logo

uk-gov-mirror / ukgovernmentbeis.beis-report-official-development-assistance Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ukgovernmentbeis/beis-report-official-development-assistance

0.0 0.0 0.0 5.16 MB

Report Official Development Assistance (RODA)

Home Page: https://www.report-official-development-assistance.service.gov.uk/

License: MIT License

Ruby 83.19% JavaScript 0.10% HTML 0.17% Dockerfile 0.26% Shell 0.83% HCL 0.92% SCSS 0.27% Haml 14.27%

ukgovernmentbeis.beis-report-official-development-assistance's Introduction

Build Status Coverage Status

Report Official Development Assistance (RODA)

This service enables the Department for Business, Energy and Industrial Strategy (BEIS) and their delivery partners to collect and report information on the spending of Official Development Assistance (ODA).

Getting started

First, run the setup script. This installs the required system (assuming you're using OSX and Homebrew), frontend and Ruby dependencies, as well as setting up the test and development databases.

script/setup

Once setup has been completed, you can start the server with

script/server

Running the tests

script/test

Running backing services with Docker compose

If you prefer not to install the backing services (Postgres and Redis) with Homebrew via the scripts above, run them in the background with Docker and then use standard rails commands to interact with the application (you will need Docker installed on your device):

docker-compose -f backing-services-docker-compose.yml up -d

To stop the backing services:

docker-compose -f backing-services-docker-compose.yml down

Architecture decision records

We use ADRs to document architectural decisions that we make. They can be found in doc/architecture/decisions and contributed to with the adr-tools.

Managing environment variables

We use Dotenv to manage our environment variables locally.

The repository will include safe defaults for development in /.env.example and for test in /.env.test. We use 'example' instead of 'development' (from the Dotenv docs) to be consistent with current dxw conventions and to make it more explicit that these values are not to be committed.

To manage sensitive environment variables:

  1. Add the new key and safe default value to the /.env.example file eg. ROLLBAR_TOKEN=ROLLBAR_TOKEN
  2. Add the new key and real value to your local /.env.development.local file, which should never be checked into Git. This file will look something like ROLLBAR_TOKEN=123456789

Release process

Our release process is documented locally.

Migrations

Schema

We use conventional Rails migrations to make changes to the schema. This includes setting or changing relevant data.

Schema migrations are applied automatically on deployment via the docker-entrypoint.sh.

Data / One-off tasks

When running a live service sometimes you're required to change existing data in some way. We do this in a similar way to database migrations, using Data Migrations

The migrations are stored in the db/data folder.

  • To generate a migration: rails g data_migration add_this_to_that
  • To run the data migration: rails runner db/data/$FILENAME_OF_THE_GENERATED_MIGRATION

When the new code deploys, you'll need to run your migration on the live service by running a live console.

Access

Staging

The app is currently hosted on GPaaS: https://staging.report-official-development-assistance.service.gov.uk

The develop branch is deployed to staging after a successful build via GitHub Actions.

Training and Penetration testing

The app has a training and or penetration testing environment: http://training.report-official-development-assistance.service.gov.uk

The environment must be manually deployed, see the documentation for more information.

Production

The app is currently hosted on GPaaS: https://www.report-official-development-assistance.service.gov.uk

The master branch is deployed to production after a successful build via GitHub Actions.

DNS

The DNS for the service is hosted and managed by dxw the source for which is maintained in this private repo:

https://github.com/dxw/beis-roda-dns

Source

This repository was bootstrapped from dxw's rails-template.

ukgovernmentbeis.beis-report-official-development-assistance's People

Contributors

beelorna avatar cristinaro avatar cropnburn avatar deberny avatar dependabot-preview[bot] avatar duffylouise avatar evilstreak avatar jcoglan avatar leeky avatar lozette avatar mariluzherrera avatar mec avatar pezholio avatar rjw1 avatar robbiepaul avatar stretch96 avatar tahb avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.