deep-foundation / deep-chain

Your 🔵 Superintelligence
https://cyb.ai
Other
9 stars 3 forks source link

Настройка cyb-ts для deepchain #12

Open suenot opened 2 months ago

suenot commented 2 months ago
version: "3.8"

services:
  bostrom:
    image: deepchain_image:latest
    restart: always
    container_name: bostrom
    ports:
      - "0.0.0.0:26090:9090"
      - "0.0.0.0:26656:26656"
      - "0.0.0.0:26657:26657"
      - "0.0.0.0:1317:1317"
      - "0.0.0.0:26660:26660"
    environment:
      ALLOW_SEARCH: "true"
    volumes:
      - $HOME/testnet:/root/.deepchain
    logging:
      options:
        max-size: "1g"
        max-file: "2"
    # deploy:
    #   resources:
    #     reservations:
    #       devices:
    #         - driver: nvidia
    #           count: all
    #           capabilities: [gpu]

  postgres:
    image: postgres:latest
    restart: always
    container_name: cyberindex_postgres
    environment:
      - POSTGRES_DB=${POSTGRES_DB_NAME}
      - POSTGRES_USER=${POSTGRES_USER_NAME}
      - POSTGRES_PASSWORD=${POSTGRES_DB_PASSWORD}
    volumes:
      - $HOME/.cyberindex/postgres:/var/lib/postgresql/data
      - ./database/schema/:/docker-entrypoint-initdb.d/
    env_file:
      - .env
    ports:
      - ${POSTGRES_DB_PORT}:5432
    depends_on:
      - ipfs

  graphql-engine:
    image: hasura/graphql-engine:latest
    restart: always
    container_name: cyberindex_hasura
    environment:
      - DOMAIN
    env_file:
      - .env
    ports:
        - ${HASURA_PORT}:8080
    depends_on:
      - postgres

  cyberindex:
    image: cyberd/cyberindex:v1.0.0
    restart: always
    container_name: cyberindex
    environment:
      - DOMAIN
    volumes:
      - ~/cybernode/.env:/app/.env
    env_file:
      - .env
    depends_on:
      - graphql-engine

  ipfs:
    image: ipfs/go-ipfs:latest
    container_name: ipfs
    restart: unless-stopped
    environment:
      - DOMAIN
    env_file:
      - .env
    volumes:
      - ./data/ipfs:/ipfsdata
    ports:
      - "4001:4001"
      - "127.0.0.1:8080:8080"
      - "127.0.0.1:5001:5001"
    depends_on:
      - bostrom

  node-exporter:
    image: prom/node-exporter:latest
    ports:
      - "127.0.0.1:9100:9100"
    container_name: node-exporter
    restart: unless-stopped
    volumes:
      - /proc:/host/proc:ro
      - /sys:/host/sys:ro
      - /:/rootfs:ro
    command:
      - '--path.procfs=/host/proc'
      - '--path.rootfs=/rootfs'
      - '--path.sysfs=/host/sys'
      - '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
    expose:
      - 9100
    depends_on:
      - cyberindex

  prometheus:
    image: prom/prometheus:latest
    ports:
      - "0.0.0.0:9090:9090"
    container_name: prometheus
    restart: unless-stopped
    volumes:
      - ./prometheus.yml:/etc/prometheus/prometheus.yml
    command:
      - '--config.file=/etc/prometheus/prometheus.yml'
      - '--storage.tsdb.path=/prometheus'
      - '--web.console.libraries=/etc/prometheus/console_libraries'
      - '--web.console.templates=/etc/prometheus/consoles'
      - '--web.enable-lifecycle'
    depends_on:
      - node-exporter

  cadvisor:
    image: gcr.io/cadvisor/cadvisor:latest
    container_name: cadvisor
    restart: unless-stopped
    ports:
      - "127.0.0.1:8089:8089"
    volumes:
      - /:/rootfs:ro
      - /var/run:/var/run:rw
      - /sys:/sys:ro
      - /var/lib/docker/:/var/lib/docker:ro
    cap_add:
      - SYSLOG
    devices:
      - "/dev/kmsg:/dev/kmsg"
    depends_on:
      - prometheus

  nginx:
    image: nginx:latest
    container_name: nginx
    environment:
      - DOMAIN
    ports:
      - "80:80"
      - "443:443"
      - "127.0.0.1:81:81"
    volumes:
      - ./volumes/nginx/cybernode.conf:/etc/nginx/conf.d/cybernode.conf
      - ./volumes/certbot/www:/var/www
      - ./volumes/certbot/letsencrypt:/etc/letsencrypt
    depends_on:
      - cadvisor

  nginx-exporter:
    image: nginx/nginx-prometheus-exporter:0.10.0
    container_name: nginx-exporter
    restart: unless-stopped
    environment:
      - SCRAPE_URI=http://nginx:81/status
      - TELEMETRY_PATH=/metrics
    ports:
      - "127.0.0.1:9113:9113"
    #mem_limit: 128m      # for docker-compose v2 only
    #mem_reservation: 64m # for docker-compose v2 only
    depends_on:
      - nginx

  certbot:
    container_name: certbot
    image: certbot/certbot:latest
    depends_on:
      - nginx
    command: certonly --cert-name cybernode --reinstall --webroot --webroot-path=/var/www/ --no-eff-email --agree-tos --email ${EMAIL} -d ${DOMAIN} -d rpc.testnet.${DOMAIN} -d grpc.testnet.${DOMAIN} -d lcd.testnet.${DOMAIN} -d ipfs.testnet.${DOMAIN} -d grafana.testnet.${DOMAIN} -d index.testnet.${DOMAIN}
    volumes:
      - ./volumes/certbot/www/:/var/www/
      - ./volumes/certbot/letsencrypt:/etc/letsencrypt:rw
    logging:
      driver: json-file
      options:
        max-size: 1m
        max-file: "3"

  blackbox-exporter:
    image: prom/blackbox-exporter:latest
    container_name: blackbox-exporter
    volumes:
      - ./blackbox.yml:/config/blackbox.yml
    ports:
      - "127.0.0.1:9115:9115"
    command:
      - '--config.file=/config/blackbox.yml'
    restart: unless-stopped
    depends_on:
      - nginx-exporter

  grafana:
    image: grafana/grafana-enterprise
    container_name: grafana
    restart: unless-stopped
    ports:
      - "0.0.0.0:4000:3000"
    environment:
      - GF_SECURITY_ADMIN_USER=admin
      - GF_SECURITY_ADMIN_PASSWORD=admin
      - GF_USERS_ALLOW_SIGN_UP=false
    volumes:
      - ./volumes/grafana:/var/lib/grafana
    depends_on:
      - prometheus
    user: "0"

  app:
    container_name: cyb-ts-app-1
    image: cyb-ts-app:latest
    ports:
      - '0.0.0.0:3000:3000'
    env_file:
      - .env
    environment:
      - NODE_OPTIONS=--max-old-space-size=8192
      - CHAIN_ID=deep
      - CYBER_NODE_URL_API=https://rpc.testnet.node.marketmaker.cc
      - CYBER_NODE_URL_WS=wss://rpc.testnet.node.marketmaker.cc/websocket
      - CYBER_NODE_URL_LCD=https://lcd.testnet.node.marketmaker.cc
      - CYBER_INDEX_HTTPS=https://index.testnet.node.marketmaker.cc/v1/graphql
      - CYBER_INDEX_WEBSOCKET=wss://index.testnet.node.marketmaker.cc/v1/graphql
      - CHAIN_ID=deep
      - RPC_URL=https://rpc.testnet.node.marketmaker.cc
      - LCD_URL=https://lcd.testnet.node.marketmaker.cc
      - WEBSOCKET_URL=wss://rpc.testnet.node.marketmaker.cc/websocket
      - INDEX_HTTPS=https://index.testnet.node.marketmaker.cc/v1/graphql
      - INDEX_WEBSOCKET=wss://index.testnet.node.marketmaker.cc/v1/graphql
      - CYBER_GATEWAY=https://gateway.testnet.node.marketmaker.cc
      - BASE_DENOM=energy
      - DENOM_LIQUID=hydrogen
      - BECH32_PREFIX=deep
    command: npx serve -s build
suenot commented 2 months ago

https://gist.github.com/suenot/04e3ac6d25c2bef5510a6cd682f888a7