-
Notifications
You must be signed in to change notification settings - Fork 24
/
docker-compose.traefik.yml
67 lines (64 loc) · 3.56 KB
/
docker-compose.traefik.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
services:
traefik:
image: traefik:2.10
restart: always
depends_on:
- front
command:
- --log.level=INFO
- --providers.docker
- --providers.docker.exposedByDefault=false
# Listen to http (80)
- --entrypoints.http.address=:80
# Redirect all HTTP traffic to https (443)
- --entrypoints.http.http.redirections.entryPoint.to=https
- --entrypoints.http.http.redirections.entryPoint.scheme=https
# Listen to https (443)
- --entryPoints.https.address=:443
- --entrypoints.https.http.tls=true
# ACME
- --certificatesresolvers.primary.acme.email=${TRAEFIK_ACME_EMAIL}
- --certificatesresolvers.primary.acme.storage=acme.json
- --certificatesresolvers.primary.acme.httpchallenge=true
- --certificatesresolvers.primary.acme.httpchallenge.entrypoint=http
ports:
- "${TRAEFIK_HTTP_PORT}:80"
- "${TRAEFIK_HTTPS_PORT}:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./acme/acme.json:/acme.json
networks:
- seat-frontend
logging:
driver: "json-file"
options:
max-size: "10Mb"
max-file: "5"
front:
networks:
- seat-frontend
labels:
- "traefik.enable=true"
- "traefik.docker.network=${COMPOSE_PROJECT_NAME}_seat-frontend"
- "traefik.http.routers.seat.entrypoints=https"
- "traefik.http.routers.seat.service=seat-front"
- "traefik.http.routers.seat.middlewares=seat-security@docker"
- "traefik.http.routers.seat.rule=Host(`${SEAT_DOMAIN}`)"
- "traefik.http.routers.seat.tls.certResolver=primary"
- "traefik.http.middlewares.seat-security.headers.browserxssfilter=false"
- "traefik.http.middlewares.seat-security.headers.contentSecurityPolicy=default-src 'none'; connect-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://fonts.bunny.net https://snoopy.crypta.tech; img-src 'self' data: https://images.evetech.net https://img.shields.io; font-src 'self' https://fonts.gstatic.com https://fonts.bunny.net; manifest-src 'self'"
- "traefik.http.middlewares.seat-security.headers.contentTypeNoSniff=true"
- "traefik.http.middlewares.seat-security.headers.customBrowserXSSValue=0"
- "traefik.http.middlewares.seat-security.headers.customresponseheaders.Server="
- "traefik.http.middlewares.seat-security.headers.customresponseheaders.X-Powered-By="
- "traefik.http.middlewares.seat-security.headers.customresponseheaders.X-Robots-Tag=none,noarchive,nosnippet,notranslate,noimageindex"
- "traefik.http.middlewares.seat-security.headers.forceSTSHeader=true"
- "traefik.http.middlewares.seat-security.headers.framedeny=true"
- "traefik.http.middlewares.seat-security.headers.permissionsPolicy=accelerometer=(), autoplay=(), camera=(), cross-origin-isolated=(), display-capture=(), encrypted-media=(), fullscreen=(self), geolocation=(), gyroscope=(), keyboard-map=(), magnetometer=(), microphone=(), midi=(), payment=(), picture-in-picture=(), publickey-credentials-get=(), screen-wake-lock=(), sync-xhr=*, usb=(), web-share=(), xr-spatial-tracking=()"
- "traefik.http.middlewares.seat-security.headers.referrerPolicy=same-origin"
- "traefik.http.middlewares.seat-security.headers.stsIncludeSubdomains=true"
- "traefik.http.middlewares.seat-security.headers.stsPreload=true"
- "traefik.http.middlewares.seat-security.headers.stsSeconds=63072000"
- "traefik.http.services.seat-front.loadbalancer.server.port=8080"
networks:
seat-frontend: