@@ -4,45 +4,7 @@ services:
44 traefik:
55 image: "traefik:v3.1.2@sha256:ec1a82940b8e00eaeef33fb4113aa1d1573b2ebb6440e10c023743fe96f08475"
66 init: true
7- command:
8- - "--api=true"
9- - "--api.dashboard=true"
10- - "--accesslog=true"
11- - "--accesslog.format=json"
12- - "--accesslog.fields.defaultmode=keep"
13- - "--accesslog.fields.names.ClientUsername=keep"
14- - "--accesslog.fields.headers.defaultmode=keep"
15- - "--accesslog.fields.headers.names.User-Agent=keep"
16- - "--accesslog.fields.headers.names.Authorization=drop"
17- - "--accesslog.fields.headers.names.Content-Type=keep"
18- - "--log.level=${OPS_TRAEFIK_LOGLEVEL}"
19- - "--metrics.prometheus=true"
20- - "--metrics.prometheus.addEntryPointsLabels=true"
21- - "--metrics.prometheus.addServicesLabels=true"
22- - "--entryPoints.metrics.address=:8082"
23- - "--metrics.prometheus.entryPoint=metrics"
24- - "--entryPoints.http.address=:80"
25- - "--entryPoints.http.transport.respondingTimeouts.idleTimeout=21600s" #6h, for https://github.com/traefik/traefik/issues/10805
26- - "--entryPoints.http.transport.respondingTimeouts.writeTimeout=21600s" #6h, for https://github.com/traefik/traefik/issues/10805
27- - "--entryPoints.http.transport.respondingTimeouts.readTimeout=21600s" #6h, for https://github.com/traefik/traefik/issues/10805
28- - "--entrypoints.http.http.redirections.entrypoint.to=https"
29- - "--entrypoints.http.http.redirections.entrypoint.scheme=https"
30- - "--entrypoints.http.http.redirections.entrypoint.permanent=true"
31- - '--entryPoints.postgres.address=:5432'
32- - '--entryPoints.postgres2.address=:5433'
33- - "--entryPoints.https.address=:443"
34- - "--entryPoints.https.transport.respondingTimeouts.idleTimeout=21600s" #6h, for https://github.com/traefik/traefik/issues/10805
35- - "--entryPoints.https.transport.respondingTimeouts.writeTimeout=21600s" #6h, for https://github.com/traefik/traefik/issues/10805
36- - "--entryPoints.https.transport.respondingTimeouts.readTimeout=21600s" #6h, for https://github.com/traefik/traefik/issues/10805
37- - "--providers.swarm.endpoint=unix:///var/run/docker.sock"
38- - "--providers.swarm.exposedByDefault=false"
39- # so that internal services are not picked up
40- - "--providers.swarm.constraints=!LabelRegex(`io.simcore.zone`, `${TRAEFIK_SIMCORE_ZONE}`)"
41- - "--core.defaultRuleSyntax=v2"
42- - "--tracing=true"
43- - "--tracing.addinternals"
44- - "--tracing.otlp=true"
45- - "--tracing.otlp.http=true"
7+ dns: 8.8.8.8
468 ports:
479 - target: 80
4810 published: 80
@@ -62,6 +24,7 @@ services:
6224 volumes:
6325 # So that Traefik can listen to the Docker events
6426 - /var/run/docker.sock:/var/run/docker.sock
27+ - /etc/traefik_certs:/etc/traefik_certs
6528 deploy:
6629 # mode: global
6730 replicas: ${OPS_TRAEFIK_REPLICAS}
@@ -79,6 +42,7 @@ services:
7942 cpus: '1.000'
8043 placement:
8144 constraints:
45+ - node.labels.traefik==true
8246 - node.role == manager
8347 labels:
8448 - traefik.enable=true
@@ -183,12 +147,15 @@ services:
183147 - traefik.http.routers.{{ from_domain_no_dots }}.tls=true
184148
185149{% endfor %}
186-
150+ env_file:
151+ - .env
187152 networks:
188153 public: null
189154 monitored: null
190155 whoami:
191156 image: "containous/whoami"
157+ dns: # Add this always for AWS, otherwise we get "No such image: " for docker services
158+ 8.8.8.8
192159 deploy:
193160 placement:
194161 constraints:
0 commit comments