Initial commit: AIS vessel position tracking microservice
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>
This commit is contained in:
commit
966ca73b9b
6 changed files with 402 additions and 0 deletions
18
docker-compose.yml
Normal file
18
docker-compose.yml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue