Skip to content

mingoland/teacher-vacancy-service

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Teacher Vacancy Service (TVS)

Prerequisites

  • Docker greater than or equal to 18.03.1-ce-mac64 (24245)

We recommend you install Docker from the link above, not using homebrew.

Setting up the project

  1. Copy the docker environment variables and fill in any missing secrets from the TeachingJobs 1Password vault:
$ cp docker-compose.env.sample docker-compose.env
  1. Build the docker container and set up the database
bin/drebuild
  1. Follow these instructions to configure HTTPS

  2. Start the application

bin/dstart

User accounts & data

Before you can log in to the application locally you will need a DfE Sign-in and an invitation to join Teaching Jobs. Talk to the team to get these set up.

Importing school data

Populate your environment with real school data. This is taken from GIAS

bin/drake data:schools:import

db/seeds.rb contain sample school data so this is not required for development

Indexing the vacancies

Index the vacancies in Elasticsearch, both in the development and test environments

bin/drake elasticsearch:vacancies:index

Running the tests

There are two ways that you can run the tests.

In development

Because the setup and teardown introduces quite some latency, we use the spring service to start up all dependencies in a docker container. This makes the test run faster.

Get the test server up and running

bin/dtest-server

Run the specs. When no arguments are specified, the default rake task is executed.

bin/dspec <args>

To run a single spec file, the args are simply the path to the desired spec file:line number, e.g.

bin/dspec spec/features/job_seekers_can_view_vacancies_spec.rb:23

Run the javascript tests

bin/dteaspoon

Full run (before you push to github)

Rebuilds the test server, runs rubocop checks, all tests (both specs and javascript) and cleans up.

bin/dtests

Troubleshooting

I see Page Not Found when I log in and try to create a job listing

Try importing the school data if you have not already. When your sign in account was created, it was assigned to a school via a URN, and you may not have a school in your database with the same URN.

I get a connection error to Elasticsearch when I try to access the application locally

It might be that the web server is attempting to connect to Elasticsearch before it has fully booted, despite Elasticsearch being listed as a dependency for the webserver. Wait for a few minutes and try again.

The application claims to have vacancies in the search results but I can't see them listed

Run the Elasticsearch vacancies index task if you haven't already:

bin/drake elasticsearch:vacancies:index

About

Department for Education's Teaching Jobs Beta

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 62.3%
  • HTML 17.0%
  • HCL 12.7%
  • JavaScript 5.0%
  • CSS 2.0%
  • Shell 0.7%
  • Other 0.3%