Sign inSign up

monolit/monokiosk

By monolit

•Updated about 9 years ago

MonoKiosk

Image
0

720

monolit/monokiosk repository overview

⁠MonoKiosk

This is the source code for the entire MonoKiosk system⁠.

⁠Overview

MonoKiosk uses infrastructure as code⁠ to ensure that

  • The environment can be reproduced from scratch automatically.
  • The development environment is the same as the production environment.
  • The site can be deployed easily into staging⁠ or production.

Where possible, the code that manages the infrastructure is declarative rather than imperative.

⁠Development

⁠First-time setup

You will need Vagrant⁠ for development.

⁠Rinse repeat

Start the docker host machine:

jp@mac:kiosk$ vagrant up
jp@mac:kiosk$ vagrant ssh
vagrant@dockerhost:~$ cd /vagrant

which puts you inside the virtual machine where the source code is mounted. To run all the tests jshint → unit tests → acceptance tests from within the virtual machine:

vagrant@dockerhost:/vagrant$ npm test

To only run the fast tests, do

vagrant@dockerhost:/vagrant$ npm run fasttest

To start the site:

vagrant@dockerhost:/vagrant$ npm start

which makes the site available to the host computer on port 3000.

From thereon you can simply edit the source files from outside the virtual box and when you are done you can just halt the virtual machine:

vagrant@dockerhost:/vagrant$ ^C
vagrant@dockerhost:/vagrant$ exit
logout
jp@mac:site$ vagrant halt

or completely remove the virtual machine

jp@mac:site$ vagrant destroy

⁠Unit Tests

Unit tests are placed in files with prefix test_ right next to what they test, so e.g. lib/util/db.js is tested by lib/util/test_db.js.

The source is mounted into /vagrant so you can change it from outside, rerun test, start up the kiosk, etc.

⁠Update Mono App List

See the crawler⁠ directory.

⁠Deployment

See DEPLOY.md⁠.

⁠TODO
  • Describe Docker and how to connect to docker daemon through vagrant.
  • Deploy site automatically into staging.

Build Status bitHound Overall Score

Tag summary

Content type

Image

Digest

Size

256 MB

Last updated

about 9 years ago

docker pull monolit/monokiosk