uphold/compose.yml

30 lines
800 B
YAML

services:
bot:
build: .
depends_on:
db:
condition: service_healthy
environment:
- DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
- PAIRS=${PAIRS:-BTC-USD}
- INTERVAL=${INTERVAL:-5000}
- THRESHOLD=${THRESHOLD:-0.01}
healthcheck:
test: ["CMD", "node", "-e", "require('node:process').exit(require('fs').existsSync('/tmp/healthy') ? 0 : 1)"]
interval: 30s
timeout: 10s
retries: 3
restart: unless-stopped
db:
image: docker.io/postgres:15-alpine
env_file: ".env"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U uphold -d uphold_alerts"]
interval: 5s
timeout: 5s
retries: 5
volumes:
pgdata: