Skip to content
BORIS delivers the Apocalypse Made Easy! program. Apocalypse Made Easy! is a Social Innovators Challenge Project funded by the Movember Foundation.
TypeScript CSS SQLPL JavaScript PLpgSQL TSQL Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
.vscode
backend
common
deploy
frontend
integration
.gitignore
Dockerfile
Makefile
README.md
package-lock.json
package.json
tsconfig.json

README.md

BORIS Web App

This is a web application designed to deliver apocalypse-preparation training activities to participants.

Installation

  1. Install Node.js version 8.7 or newer
  2. Install Docker and (if on Windows) Docker Toolbox
  3. Clone this repository

Running a local development environment

If you use Visual Studio Code, just open this repository.

Steps for Mac:

  1. First, start the database servers. Choose Tasks > Run Task > "Run Database Servers"
  2. If this is the first time running BORIS, apply the migrations: Choose Tasks > Run Task > "Apply database migrations"
  3. Hit F5 to run the backend server
  4. Choose Tasks > Run Build Task to build the frontend (and re-build it upon any changes)

Steps for Windows 10:

  1. Open the project's backend folder with the Docker Quickstart Terminal and run docker-compose up
  2. If this is the first time running BORIS, apply the migrations: Choose Tasks > Run Task > "Apply database migrations"
  3. Hit F5 to run backend server
  4. In the project's root directory run npm run watch

Go to http://localhost:3333/ to see the results.

Docker container

To create a docker container for deployment, run make container. Then you can run it with e.g.

docker run -t -p 3333:3333 --env BORIS_CONFIG='{"production": {"redis_host": "docker.for.mac.host.internal", "db_host": "docker.for.mac.host.internal"}}' boris

To run database migrations using the docker image:

docker exec -it <container name or ID> node /app/backend/db/migrate.js

Deploying to VMs

Deployment currently needs two VMs, one for databases and the other for the app.

cd deploy/
mkdir ../../boris-private/ ../../boris-private/group_vars ../../boris-private/prod ../../boris-private/prod/credentials
touch ../../boris-private/ssh_config ../../boris-private/ansible_hosts 
touch ../../boris-private/group-vars/prod.yml ../../boris-private/prod/credentials/mailgun_api_key
# Edit those files accordingly.
# Now deploy:
ansible-playbook playbook-db-server.yml -e "target=prod_db"
ansible-playbook playbook-app.yml -e "target=prod_app"
You can’t perform that action at this time.