Skip to content

alimon808/convictionvacation

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Conviction Vacation

Build Status Deployment Status

Automating conviction vacation in King County.

Some Background

One in four Washingtonians have been involved in the state criminal justice system. Those with a criminal record face significant barriers to daily life after completing their prison terms, making it harder to find housing and employment, to gain professional credentials, and to be involved in the life of their community.

Washington state’s New Hope Act makes it easier for people with past criminal records to have their convictions vacated. Yet the system is slow and inefficient. We have identified opportunities to use technology to streamline this process, and want to explore which of these technological possibilities would make the most sense to prototype, given user needs and volunteer resources.

Development Setup

Currently the entire system is a single page application that runs on GitHub Pages and uses React. In this future this may change as we add more features and develop the system further but this works well for now.

In the project directory, you can run:

  1. Ensure you have nodejs installed on your machine using whatever system package manager, on Mac using homebrew run:

    brew install nodejs
    
  2. Install project dependecies

    npm install
    
  3. Start the app in development mode

    npm start
    
  4. Visit http://localhost:3000 to view it in the browser

Development Environment with Docker

A developer workflow using Docker can be done by building the image locally or pulling from Docker Hub.

This image should be for development only and should not be used in production.

  1. Ensure you have docker installed on your machine. Refer to the Docker install instructions for more information.

  2. Pull the image from Docker Hub

    docker pull openseattle/convictionvacation:0.0.1
    
  3. Run the image and expose port 3000

    docker run -p 3000:3000 openseattle/convictionvacation:0.0.1
    

    Note: Environment variables can be added with a -e flag for advanced configurations

  4. Visit http://localhost:3000 to view it in the browser

  5. Shut down the container by viewing all running containers with docker ps -a then docker stop <container_name>

  6. After making changes, regenerate node_modules then mount the files in the container to enable hot reloading.

    docker run -v `pwd`:/root -p 3000:3000 openseattle/convictionvacation:0.0.1 npm install
    docker run -v `pwd`:/root -p 3000:3000 openseattle/convictionvacation:0.0.1
    

    Note: Windows users will need to escape the path (See this comment. The commands may take a few minutes.

    docker run -v //$(pwd):/root -p 3000:3000 openseattle/convictionvacation:0.0.1 npm install
    docker run -v //$(pwd):/root -p 3000:3000 openseattle/convictionvacation:0.0.1
    

Further React Documentation

Other Commands

npm test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

Running commands inside a Docker container

Confirm the Docker container is running docker ps -a.

The output should show the container status:

CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                       PORTS                    NAMES
d38d26e6cd69        test:latest         "docker-entrypoint.s…"   12 seconds ago      Up 11 seconds                0.0.0.0:3000->3000/tcp   blissful_meitner

Under NAMES generated by docker, find the running container and open a shell:

docker exec -it blissful_meitner /bin/sh

About

Automating conviction vacation in King County

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 92.3%
  • HTML 4.0%
  • CSS 2.8%
  • Dockerfile 0.9%