aboutsummaryrefslogblamecommitdiffstats
path: root/docker-compose.yaml
blob: 7b7f7547320ad0ed2a6c504d7d06279dc2496847 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
         










                         
                  
















                                                                                                                                  
        
                                     







                         
            
                    
                           
             

              
          


                                             
               
             

             
                


                                        
                        
                              


                                            

                                             







                         
             
             
          
                             


                                
                         
         

         

               
                   



                           
        
             
services:
  nginx:
    image: nginx:stable
    deploy:
      resources:
        limits:
          memory: 128M
    logging:
      driver: "json-file"
      options:
        max-size: "100m"
    ports:
      - "8007:443"
    networks:
      - apinet
    restart: unless-stopped
    cap_drop:
      - ALL
    cap_add:
      - CHOWN
      - DAC_OVERRIDE
      - SETGID
      - SETUID
      - NET_BIND_SERVICE
    volumes:
      - ./nginx.conf:/etc/nginx/nginx.conf:ro
      - /etc/letsencrypt/live/api.terminaldweller.com/fullchain.pem:/etc/letsencrypt/live/api.terminaldweller.com/fullchain.pem:ro
      - /etc/letsencrypt/live/api.terminaldweller.com/privkey.pem:/etc/letsencrypt/live/api.terminaldweller.com/privkey.pem:ro
    depends_on:
      - hived
  hived:
    image: terminaldweller/hived:main
    deploy:
      resources:
        limits:
          memory: 256M
    logging:
      driver: "json-file"
      options:
        max-size: "100m"
    secrets:
      - tg_bot_token
    restart: unless-stopped
    networks:
      - apinet
      - dbnet
    ports:
      - "127.0.0.1:10009:8090"
    entrypoint: ["/hived/hived"]
    command: ["serve", "--http=0.0.0.0:8090"]
    depends_on:
      - keydb
    cap_drop:
      - ALL
    environment:
      - SERVER_DEPLOYMENT_TYPE=test
      - HIVED_PRICE_SOURCE=cryptocompare
      - CMC_API_KEY=
      - POLYGON_API_KEY=
      - CRYPTOCOMPARE_API_KEY=
      - TELEGRAM_BOT_TOKEN=
    volumes:
      - ./hived/hived.toml:/hived/hived.toml
  keydb:
    image: eqalpha/keydb:alpine_x86_64_v6.3.4
    deploy:
      resources:
        limits:
          memory: 256M
    logging:
      driver: "json-file"
      options:
        max-size: "100m"
    networks:
      - dbnet
    ports:
      - "127.0.0.1:6380:6379"
    environment:
      - ALLOW_EMPTY_PASSWORD=yes
    volumes:
      - keydb-data:/data/
networks:
  dbnet:
  apinet:
secrets:
  tg_bot_token:
    file: ./tgtoken
  polygon_api_key:
    file: ./polygon_api_key
  cmc_api_key:
    file: ./cmc_api_key
volumes:
  keydb-data: