Deployment

Tim Baccaert edited this page Jul 26, 2017 · 9 revisions
  1. Install PostgreSQL You can probably find some more detailed guide for this somewhere else
$ sudo apt update && upgrade -y
$ sudo apt install -y postgresql
$ sudo passwd postgres
$ su postgres -c "psql"
$ ALTER USER postgres PASSWORD xxxxx
  1. Install dependencies
$ sudo apt update && upgrade -y
$ sudo apt install -y libncurses5-dev python2.7-dev libffi-dev libgeos-dev libspatialindex-dev python-pip osmosis curl
$ curl -sSf https://sh.rustup.rs | env -u CARGO_HOME sh -s -- -y --default-toolchain 1.18.0
  1. Clone repo
$ git clone https://github.com/oSoc17/lopeningent_backend
  1. Install python dependencies
$ cd lopeningent_backend/server
$ pip install -r requirements.txt
  1. Compile the rust source code
$ cd lopeningent_backend/server
$ cargo build --release
  1. Load the database schema
$ cd lopeningent_backend/data
$ psql --user postgres < lopeningent_schema.sql
  1. Run the data preprocessing algorithm and populate the database
$ ./update.sh
  1. Run the gunicorn server
$ cd ../server
$ gunicorn server.wsgi --bind localhost:8000 --workers 1 --timeout 300

Partners

imec - IDLab - Ghent University

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.