- Clone the repository:
git clone git@github.com:ISI-MIP/isimip-data
cd isimip-data- 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- Install and build front-end dependencies (assuming that nvm.sh is installed):
nvm install
npm install
npm run build- (optional) Create the local configuration file
config/settings/local.pyfromconfig/settings/environments/local.pyor link the file:
cp config/settings/environments/local.py config/settings/local.py
ln -s environments/local.py config/settings/local.py # alternativelyThe config/settings/local.py file can hold additional django configuration entries.
- Configure database (
./manage.py sqlcreateshows 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
- Setup database tables and admin user:
./manage.py migrate
./manage.py createsuperuser- Run the development server.
./manage.py runserver- Run webpack watch mode (in a different terminal):
npm run watchThe application is now accessible on http://localhost:8000 in your local browser.