Go service that connects to aisstream.io websocket, filtered by MMSIs from track_devices table. Writes positions to aisstream_pos (24h TTL) and upserts latest position per vessel to aisstream_last. Reloads MMSI list every 5 minutes to pick up changes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
18 lines
440 B
YAML
18 lines
440 B
YAML
services:
|
|
aisstream:
|
|
build: .
|
|
container_name: aisstream
|
|
environment:
|
|
POSTGRES_HOST: ${POSTGRES_HOST}
|
|
POSTGRES_DB: ${POSTGRES_DB}
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
POSTGRES_PORT: ${POSTGRES_PORT}
|
|
AISSTREAM_API_KEY: ${AISSTREAM_API_KEY}
|
|
networks:
|
|
- postgres_network
|
|
restart: unless-stopped
|
|
|
|
networks:
|
|
postgres_network:
|
|
external: true
|