The BEDES Manager is a web-based application for managing the superset of BEDES Atomic and Composite Terms and the related application mappings in which they are used.
The BEDES Manager is built using Angular 7, a Node.js Express server running the backend, and a PostgreSQL database.
There are 2 different ways to run the BEDES Manager:
- docker-compose
- the console using Node.js
The applicaton uses enviornment variables, taken from a file named .env
in the project root directory, for various configuration parameters.
The /sample.env
file contains all of the enviornment variables used by the application. Create a copy of this file and rename it to .env
.
At a minimum, the passwords for the bedes-manager
user needs to be set.
To launch the BEDES Manager using docker-compose:
- Set the environment variables, as indicated above, in the
.env
file. - Build the dependent Docker images:
$ make init_docker
- Start the Docker containers:
$ docker-compose up
Running docker-compose up
will launch 3 containers:
- The PostgreSQL database container.
- Initialization scripts passed into the container are in
./bedes-db/docker-entrypoint-initdb.d
, will run whenever a database needs to be initialized.
- Initialization scripts passed into the container are in
- The Backend Node.js image
- The Frontend Nginx image.
Running docker-compose up
will initially load a database with all of the BEDES tables, but no data or users created.
To load the initial set of BEDES terms, the bedes-admin
account, and the test user accounts:
$ make run_scripts_data_init
This will laucnch another Docker container that attachees to the docker network defined in the .env
file, and run 3 separate scripts located in scripts/ts
, that perform each of the three actions listed above.
The user information for the bedes-admin
and test user accounts are set in the .env
file.
The BEDES Manager requires Node.js 10.
Install all npm dependencies by running npm install
in these directories:
- bedes-frontend/
- bedes-common/
- bedes-backend/
- scripts/ts
The database was built using PostgreSQL 11.
The easiest way to get the database up and running is:
$ cd bedes-db
$ make run
This will launch a Docker container running PostgreSQL, the version of which is defined in the .env
file.
Note: the various scripts in the package assume a Docker instance of PostgreSQL, so running a local non-Docker version of PostgreSQL will require some modifications to the scripts.
To load the initial set of BEDES terms, the bedes-admin
account, and the test user accounts, run:
$ make load-dev-data
from the top-level directory of the project.
This will run 3 separate scripts located in scripts/ts
, that perform each of the three actions listed above.
The user information for the bedes-admin
and test user accounts are set in the .env
file.
Once the database is up and running, and has user accounts + test data loaded:
Start the Node.js Express server
$ cd bedes-backend
$ npm start
and
Start the Angular development server
$ cd bedes-frontend
$ npm start
Get access to Heroku. Log in. Add remote to local repo.
git push heroku BRANCHNAME:master
npm install
in the root directory (which is where server.js
lives, which Heroku uses).