services:
  dshackle-free:
    image: drpcorg/dshackle:0.75.8
    restart: unless-stopped
    volumes:
      - ./free_configs:/etc/dshackle
    expose:
      - 8080
      - 25703
    labels:
      - "prometheus-scrape.enabled=true"
      - "prometheus-scrape.port=8081"
      - "prometheus-scrape.job_name=drpc-dshackle-free"
      - "prometheus-scrape.metrics_path=/metrics"
      - "traefik.enable=true"
      - "traefik.http.services.drpc-free.loadbalancer.server.scheme=h2c"
      - "traefik.http.services.drpc-free.loadbalancer.server.port=2449"
      - "traefik.http.routers.drpc-free.entrypoints=grpc"
      - "traefik.http.routers.drpc-free.tls.certresolver=myresolver"
      - "traefik.http.routers.drpc-free.rule=Host(`$GW_FREE_DOMAIN`)"
    extra_hosts:
      - "host.docker.internal:host-gateway"
    networks:
      - chains
    logging: 
      driver: journald
      
  redis-free:
    image: healthcheck/redis:alpine
    restart: unless-stopped
    command:
      - "redis-server"
      - "--maxmemory ${GW_FREE_REDIS_RAM}"
      - "--maxmemory-policy allkeys-lru"
      - '--save ""'
    networks:
      - chains
