humlab-sead / sead_clearinghouse

SEAD ClearingHouse
0 stars 1 forks source link
data-ingestion sead sead-clearinghouse visead

VISEAD ClearingHouse

A clearinghouse system for the SEAD database including script for reporting and data imports.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Just make sure you have docker installed.

Setup development environment

Build and run development PHP-server (Docker image)

Clone the project from source.

git clone https://github.com/humlab/sead_clearinghouse.git

Run webpack in development and watch mode (bundles source files to ./public)

npm run dev

Setup the clearinghouse database

Follow instructions in sql/README. npm run build:clean-db does a clean indtall.

Build application

Docker image (prefered)

Download latest Dockerfile (into an empty folder) and build the image from the same folder.

wget https://github.com/humlab-sead/sead_clearinghouse/raw/master/Dockerfile

Build from scratch using master branch:

docker build --no-cache -t clearinghouse/app:latest .

Build from specific branch:

docker build --build-arg source_branch=branch-name -t clearinghouse/app:latest .

Docker will also build from source in current diectory if folder ./srcis present::

git clone --branch branch-name --single-branch https://github.com/humlab/sead_clearinghouse.git
docker build -t clearinghouse/app:latest .

Bundled web from source

Compile and bundle the entire web application using npm:

npm install .
npm run build:release

Bundled files are stored in ./public and is a ready to be deployed web (./dist is a compressed version).

Deployment

Docker image (preferred)

sudo docker run --rm --env-file ~/vault/.clearinghouse.env --detach --publish 8060:8060 clearinghouse/app:latest

Bundled source files (deprecated)

  1. Copy ./public folder to target server.
  2. Run start_clearinghouse.bash --build

Test

Install PHPUnit as described in https://phpunit.de.

$ wget https://phar.phpunit.de/phpunit-x.y.phar
$ chmod +x phpunit-x.y.phar
$ sudo mv phpunit-x.y.phar /usr/local/bin/phpunit
$ phpunit --version

For windows

  1. Download https://phar.phpunit.de/phpunit-x.y.phar and save the file as phpunit.phar in a folder that exists in PATH.
  2. Create phpunit.cmd as echo @php "%~dp0phpunit.phar" %* > phpunit.cmd (absolute path to php if php not in PATH) $ phpunit --version

Built With

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments