Skip to content

Commit 9b443b0

Browse files
committed
feat(docker): complete publisher fleet — 9 services, all Dockerfiles, docker-compose
- Added Dockerfiles: NDBC (met + buoycam), CO-OPS, AWX, OpenSky - Updated docker-compose.yml: 9 services with correct cadences ISS (30s), NWS (1h), NDBC met (1h), BuoyCAM (15m), CO-OPS (6m), AWX (5m), OpenSky (5m), USGS Water (15m), USGS NIMS (15m) - BuoyCAM: named volume for image cache persistence - All services: restart=always, shared OSH credentials via x-osh-env
1 parent a4eb914 commit 9b443b0

6 files changed

Lines changed: 161 additions & 0 deletions

File tree

publishers/aviation_wx/Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM python:3.12-slim
2+
3+
WORKDIR /app
4+
5+
# AviationWeather publisher uses only stdlib — no pip dependencies needed
6+
7+
# Copy publisher framework + AWX publisher
8+
COPY publishers/ /app/publishers/
9+
10+
# Default: 5min cadence (METARs update every ~5 min)
11+
ENV OSH_ADDRESS=os4csapi-osh.duckdns.org
12+
ENV OSH_PORT=443
13+
ENV OSH_USER=os4csapi
14+
ENV OSH_PASS=ogc134mm
15+
16+
ENTRYPOINT ["python", "-m", "publishers.aviation_wx.aviation_wx_publisher"]
17+
CMD ["--interval", "300"]

publishers/coops/Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM python:3.12-slim
2+
3+
WORKDIR /app
4+
5+
# CO-OPS publisher uses only stdlib — no pip dependencies needed
6+
7+
# Copy publisher framework + CO-OPS publisher
8+
COPY publishers/ /app/publishers/
9+
10+
# Default: 6min cadence (CO-OPS updates every 6 minutes)
11+
ENV OSH_ADDRESS=os4csapi-osh.duckdns.org
12+
ENV OSH_PORT=443
13+
ENV OSH_USER=os4csapi
14+
ENV OSH_PASS=ogc134mm
15+
16+
ENTRYPOINT ["python", "-m", "publishers.coops.coops_publisher"]
17+
CMD ["--interval", "360"]

publishers/docker-compose.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
# docker compose up -d nws # start NWS only
66
# docker compose logs -f nws # follow NWS logs
77
# docker compose down # stop all
8+
# docker compose ps # check status
89
#
910
# All publishers share the same OSH server credentials via the x-osh-env anchor.
11+
# All 9 publishers run as persistent services with automatic restart.
1012

1113
x-osh-env: &osh-env
1214
OSH_ADDRESS: os4csapi-osh.duckdns.org
@@ -16,6 +18,7 @@ x-osh-env: &osh-env
1618
OSH_ROOT: sensorhub
1719

1820
services:
21+
# ── ISS Satellite Tracking (30s cadence) ──
1922
iss:
2023
build:
2124
context: ..
@@ -25,6 +28,7 @@ services:
2528
<<: *osh-env
2629
command: ["--interval", "30"]
2730

31+
# ── NWS Surface Observations (1h cadence) ──
2832
nws:
2933
build:
3034
context: ..
@@ -34,6 +38,61 @@ services:
3438
<<: *osh-env
3539
command: ["--interval", "3600"]
3640

41+
# ── NDBC Buoy Met Observations (1h cadence) ──
42+
ndbc:
43+
build:
44+
context: ..
45+
dockerfile: publishers/ndbc/Dockerfile
46+
restart: always
47+
environment:
48+
<<: *osh-env
49+
command: ["--interval", "3600"]
50+
51+
# ── NDBC BuoyCAM Imagery (15min cadence) ──
52+
ndbc-buoycam:
53+
build:
54+
context: ..
55+
dockerfile: publishers/ndbc/Dockerfile.buoycam
56+
restart: always
57+
environment:
58+
<<: *osh-env
59+
BUOYCAM_CACHE_ROOT: /var/www/buoycam
60+
BUOYCAM_CACHE_BASE_URL: https://os4csapi-osh.duckdns.org/buoycam
61+
volumes:
62+
- buoycam-cache:/var/www/buoycam
63+
command: ["--interval", "900"]
64+
65+
# ── CO-OPS Coastal Observations (6min cadence) ──
66+
coops:
67+
build:
68+
context: ..
69+
dockerfile: publishers/coops/Dockerfile
70+
restart: always
71+
environment:
72+
<<: *osh-env
73+
command: ["--interval", "360"]
74+
75+
# ── AviationWeather METAR (5min cadence) ──
76+
aviation-wx:
77+
build:
78+
context: ..
79+
dockerfile: publishers/aviation_wx/Dockerfile
80+
restart: always
81+
environment:
82+
<<: *osh-env
83+
command: ["--interval", "300"]
84+
85+
# ── OpenSky ADS-B Feed (5min cadence) ──
86+
opensky:
87+
build:
88+
context: ..
89+
dockerfile: publishers/opensky/Dockerfile
90+
restart: always
91+
environment:
92+
<<: *osh-env
93+
command: ["--interval", "300"]
94+
95+
# ── USGS Water Monitoring (15min cadence) ──
3796
usgs-water:
3897
build:
3998
context: ..
@@ -43,3 +102,17 @@ services:
43102
<<: *osh-env
44103
# USGS_API_KEY: "${USGS_API_KEY:-}"
45104
command: ["--interval", "900"]
105+
106+
# ── USGS NIMS Imagery (15min cadence) ──
107+
usgs-nims:
108+
build:
109+
context: ..
110+
dockerfile: publishers/usgs_nims/Dockerfile
111+
restart: always
112+
environment:
113+
<<: *osh-env
114+
# USGS_API_KEY: "${USGS_API_KEY:-}"
115+
command: ["--interval", "900"]
116+
117+
volumes:
118+
buoycam-cache:

publishers/ndbc/Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM python:3.12-slim
2+
3+
WORKDIR /app
4+
5+
# NDBC publisher uses only stdlib — no pip dependencies needed
6+
7+
# Copy publisher framework + NDBC publisher
8+
COPY publishers/ /app/publishers/
9+
10+
# Default: 1h cadence (NDBC realtime2 updates hourly)
11+
ENV OSH_ADDRESS=os4csapi-osh.duckdns.org
12+
ENV OSH_PORT=443
13+
ENV OSH_USER=os4csapi
14+
ENV OSH_PASS=ogc134mm
15+
16+
ENTRYPOINT ["python", "-m", "publishers.ndbc.ndbc_publisher"]
17+
CMD ["--interval", "3600"]

publishers/ndbc/Dockerfile.buoycam

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM python:3.12-slim
2+
3+
WORKDIR /app
4+
5+
# BuoyCAM publisher uses only stdlib — no pip dependencies needed
6+
7+
# Copy publisher framework + NDBC publisher (includes buoycam)
8+
COPY publishers/ /app/publishers/
9+
10+
# Default: 15min cadence
11+
ENV OSH_ADDRESS=os4csapi-osh.duckdns.org
12+
ENV OSH_PORT=443
13+
ENV OSH_USER=os4csapi
14+
ENV OSH_PASS=ogc134mm
15+
# BuoyCAM cache directory (mount a volume for persistence)
16+
ENV BUOYCAM_CACHE_ROOT=/var/www/buoycam
17+
ENV BUOYCAM_CACHE_BASE_URL=https://os4csapi-osh.duckdns.org/buoycam
18+
19+
ENTRYPOINT ["python", "-m", "publishers.ndbc.ndbc_buoycam_publisher"]
20+
CMD ["--interval", "900"]

publishers/opensky/Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM python:3.12-slim
2+
3+
WORKDIR /app
4+
5+
# OpenSky publisher uses only stdlib — no pip dependencies needed
6+
7+
# Copy publisher framework + OpenSky publisher
8+
COPY publishers/ /app/publishers/
9+
10+
# Default: 5min cadence (OpenSky anonymous: 400 credits/day)
11+
ENV OSH_ADDRESS=os4csapi-osh.duckdns.org
12+
ENV OSH_PORT=443
13+
ENV OSH_USER=os4csapi
14+
ENV OSH_PASS=ogc134mm
15+
16+
ENTRYPOINT ["python", "-m", "publishers.opensky.opensky_publisher"]
17+
CMD ["--interval", "300"]

0 commit comments

Comments
 (0)