Skip to content

Latest commit

 

History

History
66 lines (47 loc) · 1.58 KB

File metadata and controls

66 lines (47 loc) · 1.58 KB

Development Setup

  1. Clone the repository:
git clone git@github.com:ISI-MIP/isimip-data
cd isimip-data
  1. Create a virtual environment and install Python dependencies:
python3 -m venv env
source env/bin/activate  # this needs to be done for each new terminal session
pip install -r requirements/dev.txt
  1. Install and build front-end dependencies (assuming that nvm.sh is installed):
nvm install
npm install
npm run build
  1. (optional) Create the local configuration file config/settings/local.py from config/settings/environments/local.py or link the file:
cp config/settings/environments/local.py config/settings/local.py
ln -s environments/local.py config/settings/local.py               # alternatively

The config/settings/local.py file can hold additional django configuration entries.

  1. Configure database (./manage.py sqlcreate shows the commands needed for your setup):
CREATE USER isimip_data WITH ENCRYPTED PASSWORD 'isimip_data' CREATEDB;
CREATE DATABASE isimip_data WITH ENCODING 'UTF-8' OWNER "isimip_data";
GRANT ALL PRIVILEGES ON DATABASE isimip_data TO isimip_data;

\c isimip_metadata
GRANT SELECT ON ALL TABLES IN SCHEMA public TO isimip_data
  1. Setup database tables and admin user:
./manage.py migrate
./manage.py createsuperuser
  1. Run the development server.
./manage.py runserver
  1. Run webpack watch mode (in a different terminal):
npm run watch

The application is now accessible on http://localhost:8000 in your local browser.