gfs-weather-server
Backend for downloading, storing and serving meteorological data.
Installation
git clone ...
Configuration
Copy config.sample.json
to config.json
and adjust the settings to your environment.
{
"server": {
"port": 8080
},
"db": "mongoose",
"mongoose": {
"connString": "mongodb://localhost/gfs"
},
"sequelize": {
"user": "gfs",
"database": "gfs",
"password": "foo",
"options": {
"host": "localhost",
"port": 5432,
"dialect": "postgres"
},
"modelOptions": {
"schema": "weather",
"underscored": true
}
},
"downloader": {
"latestUpdate": null,
"target": "/tmp/gfs-downloader",
"forecastStart": 0,
"forecastEnd": 72,
"fields": [{
"name": ["UGRD", "VGRD"],
"combinedName": "UVGRD",
"surface": "10 m above ground",
"resolution": 1
}, {
"name": "TMP",
"surface": "surface",
"resolution": 1
}, {
"name": "PRATE",
"surface": "surface",
"process": ["to-regular", 90, 0, 1, 1, 360, 181]
}
]
}
}
Usage
Standalone server
docker build gfs-server:latest .
docker run -i -t gfs-server:latest start
Cronjobs
docker build gfs-server:latest .
docker run -i -t gfs-server:latest crond
Manually run a cron job
docker run -i -t gfs-server:latest crond -- --run-once download