version: '3.1'

services:
  celo-archive:
    image: us.gcr.io/celo-org/geth:mainnet
    restart: unless-stopped
    stop_grace_period: 1m
    command: |
      --verbosity 3
      --syncmode full
      --gcmode archive
      --txlookuplimit=0
      --cache.preimages
      --port 58395
      --http
      --http.vhosts=*
      --http.addr 0.0.0.0
      --http.api eth,net,web3,debug,admin,personal
      --datadir /root/.celo
    expose:
      - 8545
      - 8546
    ports:
      - '58395:58395/tcp' # p2p
      - '58395:58395/udp' # p2p
    volumes:
      - celo-archive:/root/.celo
    networks:                                                                                         
      - chains
    labels:
      - "traefik.enable=true"
      - "traefik.http.middlewares.celo-stripprefix.stripprefix.prefixes=/celo-archive"
      - "traefik.http.services.celo.loadbalancer.server.port=8545"
      - "traefik.http.routers.celo.entrypoints=websecure"
      - "traefik.http.routers.celo.tls.certresolver=myresolver"
      - "traefik.http.routers.celo.rule=Host(`$DOMAIN`) && PathPrefix(`/celo-archive`)"
      - "traefik.http.routers.celo.middlewares=celo-stripprefix, ipwhitelist"


volumes:
  celo-archive:

    
