Skip to content

Deployment

krishna kumar edited this page Oct 21, 2022 · 14 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
# \q
  1. Install dependencies
$ sudo apt update && upgrade -y
$ sudo apt install -y libncurses5-dev python2.7-dev libffi-dev libgeos-dev libspatialindex-dev python3-pip osmosis curl
$ curl -sSf https://sh.rustup.rs | env -u CARGO_HOME sh -s -- --no-modify-path --default-toolchain 1.20.0
$ source "$HOME/.cargo/env"
  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. Start the server
$ cd ../server
$ #gunicorn server.wsgi --bind localhost:8000 --workers 1 --timeout 300
$ ./deploy.sh

Partners

imec - IDLab - Ghent University

Clone this wiki locally