spb/earth-now Public License
earth-now.co — real-time planetary dashboard: live world metrics modeled, not streamed.
TypeScript 93%
Shell 2.3%
SQL 1.4%
JavaScript 1.3%
Dockerfile 1.2%
CSS 0.8%
1# earth-now.co2# Author: Simon-Pierre Boucher3# Contact: contact@spboucher.ai4# File: infra/docker-compose.prod.yml5# Purpose: Production stack on node m3u96b — web, api, ingest, TimescaleDB, Redis, nginx proxy (ngrok fronts port 8080)6#7# Secrets come from a `.env` file next to this compose file (or the shell env).8# NEVER commit tokens or passwords — POSTGRES_PASSWORD and NGROK_AUTHTOKEN live in the9# environment / secret manager only.1011services:12 web:13 build:14 context: ..15 dockerfile: infra/docker/web.Dockerfile16 restart: unless-stopped17 environment:18 NODE_ENV: production19 PORT: "3000"20 API_ORIGIN: http://api:400021 expose:22 - "3000"23 depends_on:24 - api2526 api:27 build:28 context: ..29 dockerfile: infra/docker/api.Dockerfile30 restart: unless-stopped31 environment:32 NODE_ENV: production33 PORT: "4000"34 DATABASE_URL: postgres://earthnow:${POSTGRES_PASSWORD:?POSTGRES_PASSWORD must be set in .env}@db:5432/earthnow35 REDIS_URL: redis://redis:637936 expose:37 - "4000"38 depends_on:39 - db40 - redis4142 ingest:43 build:44 context: ..45 dockerfile: infra/docker/ingest.Dockerfile46 restart: unless-stopped47 environment:48 NODE_ENV: production49 DATABASE_URL: postgres://earthnow:${POSTGRES_PASSWORD:?POSTGRES_PASSWORD must be set in .env}@db:5432/earthnow50 REDIS_URL: redis://redis:637951 RAW_ARCHIVE_DIR: /data/raw52 volumes:53 # We keep ALL raw ingested data for re-fitting (S3 later).54 - raw_archive:/data/raw55 depends_on:56 - db57 - redis5859 db:60 image: timescale/timescaledb:latest-pg1661 restart: unless-stopped62 environment:63 POSTGRES_USER: earthnow64 POSTGRES_DB: earthnow65 POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?POSTGRES_PASSWORD must be set in .env}66 volumes:67 - db_data:/var/lib/postgresql/data68 # Bootstrap schema on first start; later migrations run via `pnpm db:migrate`.69 - ./migrations:/docker-entrypoint-initdb.d:ro70 expose:71 - "5432"7273 redis:74 image: redis:7-alpine75 restart: unless-stopped76 expose:77 - "6379"7879 proxy:80 image: nginx:alpine81 restart: unless-stopped82 ports:83 # ngrok (reserved domain www.earth-now.co) fronts this port on the host.84 - "8080:80"85 volumes:86 - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro87 depends_on:88 - web89 - api9091volumes:92 db_data:93 raw_archive:94