services:
  omniroute:
    image: diegosouzapw/omniroute:3.8.17
    restart: unless-stopped

    expose:
      - "20128"
      - "20129"

    volumes:
      - omniroute-prod-data:/app/data

    environment:
      - NODE_ENV=production
      - PORT=${PORT:-20128}
      - DASHBOARD_PORT=${DASHBOARD_PORT:-${PORT:-20128}}
      - API_PORT=${API_PORT:-20129}
      - API_HOST=${API_HOST:-0.0.0.0}
      - HOSTNAME=0.0.0.0
      - DATA_DIR=/app/data
      - PATH=/home/node/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

  redis:
    image: redis:8.6.2-alpine
    restart: unless-stopped
    volumes:
      - redis-prod-data:/data
    command: redis-server --save 60 1 --loglevel warning
    healthcheck:
      test: [ "CMD", "redis-cli", "ping" ]
      interval: 10s
      timeout: 5s
      retries: 3

volumes:
  omniroute-prod-data:
  
  redis-prod-data:


