ws-availability implements the FDSN specification of the availability webservice.
- Go to the root directory
- Copy
config.py.sample
toconfig.py
and adjust it as needed - Create the virtual environment:
$ python3 -m venv env
- Activate the virtual environment:
$ source env/bin/activate
- Install the dependencies:
(env) $ pip install -r requirements.txt
- Now you can either:
- Run it:
(env) $ RUNMODE=test FLASK_APP=start.py flask run
- Debug it in VS Code (F5)
- Run it:
ws-availability
relies on the seedtree5 database used at RESIF-DC.
The file update_wsavailability_schema.sql
can be used to build the necessary materialized view.
This is RESIF-DC inners and is not detailed here.
$ docker build -t ws-availability:latest .
# Run with bridged network
$ docker run -d --restart=always -e RUNMODE=production -p 9001:9001 --name ws-availability ws-availability:latest
# Or
$ docker run --rm -e RUNMODE=test -p 9001:9001 --name ws-availability ws-availability:latest
# Run with shared host network
$ docker run -d --restart=always -e RUNMODE=production --net=host --name ws-availability ws-availability:latest
# Or
$ docker run --rm --net=host -e RUNMODE=test --name ws-availability ws-availability:latest
Then :
$ wget -O - http://localhost:8000/1/application.wadl
Run it in debug mode with flask:
$ RUNMODE=test FLASK_APP=start.py flask run
production
test
This repository has been forked from https://gitlab.com/resif/ws-availability, special thanks to our colleagues at RESIF for sharing their implementation of the FDSNWS-Availability web service. 💐