Information categorization is prerequisite to just about everything related to risk management, but NIST SP 800-60, Guide for Mapping Types of Information and Information Systems to Security Categories is not ideal for searching through various data types. We created typist
to support some simple searching capabilities (poorly) and provide a simpler organization of all the interconnected information.
It's possible to run typist
locally in devcontainers! Here's a walkthrough, courtesy of @mzia (thanks!).
Note: We've only tested this on MacOS, but it should work on any platform that supports devcontainers.
Ensure you have Docker Desktop.
> git clone [https://github.com/risk-redux/typist.git](https://github.com/risk-redux/typist.git)
> cd typist
> docker volume create typist-db
> docker volume create typist-bundle
> docker-compose -f .devcontainer/docker-compose.yml build --no-cache
> docker-compose -f .devcontainer/docker-compose.yml up -d
> docker-compose -f .devcontainer/docker-compose.yml exec -w /typist rails-app bundle install
-f
: Specifies the path fordocker-compose.yml
in the.devcontainer
subdirectory.build
: Directs Docker Compose to build the application image using the provided.devcontainer/Dockerfile
the first time you run it.
With the containers running, the final step is to create and seed the database. The devcontainer.json
file specifies that this should happen automatically in a Dev Container environment, but we'll run the command manually.
> docker-compose -f .devcontainer/docker-compose.yml exec -w /typist rails-app bundle exec rails db:setup
> docker-compose -f .devcontainer/docker-compose.yml exec -w /typist rails-app bundle exec rails server -b 0.0.0.0
- The
rails db:setup
command is a convenient shortcut that runsdb:create
,db:migrate
, anddb:seed
all at once. It will create the database, apply the schema, and populate it with the necessary initial data.
The application is now fully running and configured! Open your web browser and navigate to:
[http://localhost:3000](http://localhost:3000)
Any code changes you make in your local project directory will be immediately reflected in the running container, allowing for live development.
> docker-compose -f .devcontainer/docker-compose.yml exec rails-app rails c
> docker-compose -f .devcontainer/docker-compose.yml exec rails-app <your-command-here>
Go to the terminal where the containers are running (Step 3) and press ⌘ + C
.
I'm open to Issues and Pull Requests!