WARNING! DO NOT USE THIS DEPLOYMENT IN A PRODUCTION ENVIRONMENT!
This document describes installation steps required to install locally for development.
- Install nodejs (>=18)
- Install python and python-dev (>=3.11)
- Install and start postgresql (>=15)
- Install libreoffice
- Create a postgresql database and user:
sudo -u postgres createuser -Pds multilateralfund && sudo -u postgres createdb --encoding=UTF8 multilateralfund - Create readonly postgres user (run in pstgres shell):
CREATE USER <READONLY_USER> WITH PASSWORD '<READONLY_PASSWORD>';
GRANT CONNECT ON DATABASE <POSTGRES_DB> TO <READONLY_USER>;
GRANT USAGE ON SCHEMA <schema_name> TO <READONLY_USER>;
GRANT SELECT ON ALL TABLES IN SCHEMA <schema_name> TO <READONLY_USER>;
ALTER DEFAULT PRIVILEGES IN SCHEMA <schema_name> GRANT SELECT ON TABLES TO <READONLY_USER>;- (Recommended) create and activate a python virtualenv
- Clone this repository
- Configure local settings, starting from the dev example
cp .env.example .env
- Install dependencies
pip install -c requirements-dev.txt
- Run migrations
./manage.py migrate
- Change directory to the frontend directory
cd frontend - Install dependencies
npm install
-
Start the backend with hot-reload
./manage.py runserver
-
Start the frontend with hot-reload (from frontend directory)
cd frontend npm run dev -
Check frontend is running correctly at http://localhost:3000
-
Check backend is running correctly at http://localhost:8000/admin/
- Update the code with the latest version
- Update third-party packages required at runtime.
pip install -c requirements-dev.txt
- Update frontend dependencies
cd frontend && npm install
- Run migrations:
./manage.py migrate
Check the development guide to help you get started.