ALISS 
ALISS - A Local Information System for Scotland and Connecting you to your Community
JS Plugin
Embed ALISS search features on your own site with the aliss.js plugin.
Links
- Production site: https://www.aliss.org
- Search API endpoint (v4): https://www.aliss.org/api/v4/services/search/
- API docs: http://docs.aliss.org
- API docs repo: https://github.com/aliss/Docs
How to install ALISS
Requirements
- Python 3
- pip3
- NPM (Node package manager)
- See
requirements.txt
for pip packages - See
package.json
for node packages - Elasticsearch >=6.1.3
- Postgres >= 9.0
- Heroku toolbelt (only if deploying to Heroku)
Install steps
- Install requirements e.g. Python 3 https://www.python.org/downloads/.
- Clone repository https://help.github.com/en/articles/cloning-a-repository.
- If not installed download pip3 https://pip.pypa.io/en/stable/installing/.
- Use pip3 to install the dependencies in requirements.txt on MacOS this can be achieved with
pip3 install -r requirements.txt
. - If not already installed download NPM https://www.npmjs.com/get-npm.
- Install the npm packages using command
npm i
. - Run
gulp
to compile assets - Run migrations e.g.
python3 manage.py migrate
- Configure environment variables & seed data (see 'Configuring ALISS')
Configuring ALISS
To run the ALISS project it is necessary to setup the environment on your machine and import data. NB if you are using heroku / heroku toolbelt you may need to preface these commands with heroku local:run
e.g. heroku local:run python3 manage.py shell
.
- Create a hidden file
.env
this will store necessary environment variables. - With the use of
.env.example
copy the contents and customise with the relevant information for your environment. - Ensure elasticsearch server is running
systemctl start elasticsearch.service
- Import the place name/postcode data with management command
python3 manage.py loaddata aliss/data/postcodes/postcodes.json.zip
. - Import geo-boundary data with management command
python3 manage.py extract_geodata
. - Create a super_user account for local admin privileges using command
python3 manage.py createsuperuser
inputting an email address and password as per the prompts.
Common Commands
Command | Description | Further Information |
---|---|---|
heroku local -i Procfile.dev |
Start the local server for running the app at localhost:5000 in your browser. | https://docs.djangoproject.com/en/1.11/ref/django-admin/#runserver |
heroku local:run python3 manage.py test |
Run the automated tests | https://docs.djangoproject.com/en/1.11/topics/testing/ |
heroku local:run python3 manage.py shell |
Run the Django shell | https://docs.djangoproject.com/en/1.11/ref/django-admin/#shell |
Notes on data
Regarding boundaries and service areas see https://www.opendata.nhs.scot/dataset/geography-codes-and-labels