Website hosting the NESP2 webmap
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
- create a
app/instance/config.py
file with the lineSECRET_KEY = '<your secret key>'
. If needed, you can generate a key withpython -c 'import os; print(os.urandom(16))'
) - install docker and docker-compose
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 runsudo docker build -t nesp2_website $(<docker-inputs.txt) .
sudo docker run -rm -p 5000:5000 nesp2_website
- Access the website at localhost:5000
- to stop the service simply
ctrl + c
in the terminal from point 2.
- Define the database env variable either in your terminal or in
.env
file (docker-compose will look into it) sudo docker-compose up -d --build
- your app is available at
0.0.0.0:5000
orlocalhost:5000
- Access the website at localhost:5000
- to stop the service
sudo docker-compose down
In case something goes wrong, use sudo docker logs nesp2_website
to check the logs