Skip to content

Commit 588cb72

Browse files
committed
feat(usgs-eq): Phase 3 — USGS Earthquake Feed publisher
Pattern C feed adapter: single system, single datastream, many events per cycle. - bootstrap_usgs_eq.py: procedure + system + datastream + 2 deployments - usgs_eq_publisher.py: polls all_day.geojson every 60s, dedupes by (id, updated) - Dockerfile + docker-compose updated (10 services total) - Bootstrap run: proc=046g sys=059g ds=05ag deploy_root=054g deploy_feed=0550 - First cycle: 294 earthquakes published, 0 errors - VM deployed as systemd service (12 services running total)
1 parent 9b443b0 commit 588cb72

5 files changed

Lines changed: 927 additions & 0 deletions

File tree

publishers/docker-compose.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,5 +114,15 @@ services:
114114
# USGS_API_KEY: "${USGS_API_KEY:-}"
115115
command: ["--interval", "900"]
116116

117+
# ── USGS Earthquake Feed (60s cadence) ──
118+
usgs-eq:
119+
build:
120+
context: ..
121+
dockerfile: publishers/usgs_eq/Dockerfile
122+
restart: always
123+
environment:
124+
<<: *osh-env
125+
command: ["--interval", "60"]
126+
117127
volumes:
118128
buoycam-cache:

publishers/usgs_eq/Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM python:3.12-slim
2+
3+
LABEL maintainer="OS4CSAPI" \
4+
description="USGS Earthquake Feed publisher — polls all_day GeoJSON every 60s"
5+
6+
WORKDIR /app
7+
COPY bootstrap_helpers.py publishers/bootstrap_helpers.py
8+
COPY publishers/__init__.py publishers/__init__.py
9+
COPY publishers/usgs_eq/ publishers/usgs_eq/
10+
11+
# No pip install needed — stdlib only
12+
13+
ENV OSH_ADDRESS=os4csapi-osh.duckdns.org \
14+
OSH_PORT=443 \
15+
OSH_USER=os4csapi \
16+
OSH_PASS=ogc134mm
17+
18+
CMD ["python", "-u", "-m", "publishers.usgs_eq.usgs_eq_publisher", "--interval", "60"]

publishers/usgs_eq/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# USGS Earthquake Feed publisher package

0 commit comments

Comments
 (0)