Weather station software WeeWX
This includes WeeGreen skin; see the live site for
First create secrets as defined below, in /var/adm/admin/secrets.
Ensure your weather station device (usually /dev/ttyUSB0) is
read/writeable by user "weewx" (uid 2071) or by gid 20 (group
"dialout") via udev rules--all other parameters can be set as below.
Then deploy this service with docker-compose; see the example
docker-compose.yml. Available environment variables are below.
To create the external-facing web site, use the simple nginx.conf
configuration provided here. You can run nginx under docker swarm with
the docker-compose-nginx.yml stack definition.
|ALTITUDE||"100, foot"||elevation of station|
|DB_BINDING_SUFFIX||mysql||suffix for db binding stanzas|
|DB_HOST||db||hostname of db|
|DB_NAME||weewx_a||name of main archive database|
|DB_NAME_FORECAST||weewx_f||name of forecast database|
|DB_USER||weewx||username for db|
|HTML_ROOT||/var/www/weewx||tmp directory for generating html/png images|
|LOCATION||"Anytown, USA"||location to display in banner|
|RAIN_YEAR_START||7||month to start collecting annual rain data|
|RAPIDFIRE||True||enable Weather Underground realtime updates|
|RSYNC_DEST||/usr/share/nginx/html||rsync destination path|
|RSYNC_HOST||web01||rsync destination host|
|RSYNC_PORT||22||rsync ssh port|
|SKIN||standard||skin to enable|
|STATION_ID||unset||Weather Underground station ID|
|STATION_TYPE||Vantage||station type (see usersguide|
|SYSLOG_DEST||/var/log/messages||Syslog file or TCP dest (@@host:port)|
|TZ_CODE||10||Davis VantagePro timezone code see index|
|WEEK_START||6||day of week to start weekly data (0 = Mon)|
|XTIDE_LOCATION||unset||xtide setting, see index|
|weewx-db-password||database password for MySQL|
|weewx-rsync-sshkey||private ssh key for rsync upload|
|weewx-wunderground-apikey||API key for Wunderground.com|
|weewx-wunderground-password||password for Wunderground.com|
This can't run in swarm because it needs to attach the weather
stations as devices. Currently, docker-compose doesn't support
"external" secrets outside a swarm so they have to be stored as
Tide info for US locations is generated by a library called
xtide; there's no binary package for it in Alpine Linux
so a somewhat complicated set of commands is included here to package
it from source within Dockerfile.
Output logging from weewx is a bit of a mess: when running
in foreground, a lot of verbose clutter appears on stdout; the
real logs go to syslog and there's no configuration method to
send these elsewhere (like stdout to conform to Docker's logging
standard). So the SYSLOG_DEST environment variable provided here
can provide a way to send proper logging (via the rsyslogd
process included in this image) to a central syslog service.