Skip to content

Latest commit

 

History

History
45 lines (36 loc) · 1.72 KB

README.md

File metadata and controls

45 lines (36 loc) · 1.72 KB

Website hosting the NESP2 webmap

Build Status

Getting started

After cloning this repository, checkout the dev branch

git checkout dev

Create a virtual environment (with python3), then

pip3 install -r app/requirements.txt

Pull the latest changes from the maps repository

python3 app/setup_maps.py

Start the app with

python3 index.py

Deploy on docker (instructions for ubuntu)

  1. create a app/instance/config.py file with the line SECRET_KEY = '<your secret key>'. If needed, you can generate a key with python -c 'import os; print(os.urandom(16))')
  2. install docker and docker-compose

With simple Dockerfile

  1. sudo docker build -t nesp2_website . you can use the --build-arg command to provide the postgresql login infos, or store it in a file and run sudo docker build -t nesp2_website $(<docker-inputs.txt) .
  2. sudo docker run -rm -p 5000:5000 nesp2_website
  3. Access the website at localhost:5000
  4. to stop the service simply ctrl + c in the terminal from point 2.

With docker-compose

  1. Define the database env variable either in your terminal or in .env file (docker-compose will look into it)
  2. sudo docker-compose up -d --build
  3. your app is available at 0.0.0.0:5000 or localhost:5000
  4. Access the website at localhost:5000
  5. to stop the service sudo docker-compose down

In case something goes wrong, use sudo docker logs nesp2_website to check the logs