Files
ethereum-rpc-docker/rpc.yml
2025-03-18 07:18:19 +02:00

48 lines
1.6 KiB
YAML

services:
traefik:
image: traefik:v2.11.0
container_name: traefik
restart: always
expose:
- "8082"
ports:
- "443:443"
- "80:80"
- "3042:3042"
command:
- "--api=true"
- "--api.insecure=true"
- "--api.dashboard=true"
- "--log.level=info"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--providers.file.filename=/dynamic_config.yml"
- "--entrypoints.websecure.address=:443"
- "--entryPoints.metrics.address=:8082"
- "--entryPoints.grpc.address=:3042"
- "--entrypoints.web.address=:80"
- "--metrics.prometheus.entryPoint=metrics"
- "${NO_SSL:---entrypoints.web.http.redirections.entryPoint.to=websecure}"
- "${NO_SSL:---entrypoints.web.http.redirections.entryPoint.scheme=https}"
- "${NO_SSL:---certificatesresolvers.myresolver.acme.tlschallenge=true}"
- "${NO_SSL:---certificatesresolvers.myresolver.acme.email=$MAIL}"
- "${NO_SSL:---certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json}"
volumes:
- "./traefik/letsencrypt:/letsencrypt"
- "./main_configs:/main_configs"
- "./traefik/config/dynamic_config.yml:/dynamic_config.yml"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
networks:
- chains
labels:
- "traefik.enable=true"
- "traefik.http.middlewares.ipwhitelist.ipwhitelist.sourcerange=$WHITELIST"
- "prometheus-scrape.enabled=true"
- "prometheus-scrape.port=8082"
- "prometheus-scrape.job_name=traefik"
logging:
options:
max-file: '1'
compress: 'false'
driver: local