services: {{ app_name }}: image: {{ traefik_image_name }} container_name: {{ app_name }} restart: unless-stopped ports: - 80:80 - 443:443 command: - --configFile=/etc/traefik/traefik.yml volumes: - {{ docker_socket_path }}:/var/run/docker.sock:ro - ./{{ traefik_config_dir }}/static:/etc/traefik # For traefik.yml - ./{{ traefik_config_dir }}/rules:/rules # For dynamic configurations - ./{{ traefik_config_dir }}/letsencrypt:/letsencrypt - ./{{ traefik_config_dir }}/plugins:/plugins-storage # For Traefik v2 plugins - ./{{ traefik_log_dir }}:/logfiles networks: {{ traefik_proxy_net }}: ipv4_address: {{ traefik_net_ip_addr }} networks: {{ traefik_proxy_net }}: external: true