version: "3.7"
services:

  th:
    hostname: th
    container_name: th
    image: th
    restart: always
    build:
      context: ./app
    ports:
      - 23456:23456
    environment:
      - SAVE_SECRET=------!@#RandomSecret123-------
      - TIMEOUT=600
      - DOMAIN=th.piper.finance
      - PORT=23456
      - REDIS_HOST=redis
      - REDIS_PORT=6379
      - REDIS_URL=redis://redis:6379
      - MONGO_HOST=mongo
      - MONGO_PORT=27017
      - MONGO_URL=mongodb://piperFinance:Piper2022@mongo:27017
      - API_LIST=./data/api_keys.json

    networks:
      - mongo_db
      - redis_db
      - default

networks:
  default:
    driver: bridge
    name: th_default
  redis_db:
    external:
      name: redis_db
  mongo_db:
    external:
      name: mongo_db
