-
Notifications
You must be signed in to change notification settings - Fork 1
/
oauth.yml
55 lines (53 loc) · 1.99 KB
/
oauth.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
version: '3.7'
services:
oauth:
image: thomseddon/traefik-forward-auth
TZ: ${TZ}
CLIENT_ID: $OAUTHCLIENTID
CLIENT_SECRET: $OAUTHCLIENTSECRET
SECRET= COOKIESECRET # can be anything
COOKIE_SECURE=false
COOKIE_DOMAINS=${DOMAINNAME}
AUTH_HOST=oauth.${DOMAINNAME}
WHITELIST= ${EMAIL} # Enter Gmail accounts you want to allow access
networks:
- traefik
deploy:
mode: replicated
replicas: 1
# placement:
# constraints: [node.role == manager]
update_config:
delay: 30s
restart_policy:
condition: on-failure
max_attempts: 5
labels:
traefik.enable: "true"
traefik.frontend.headers.customResponseHeaders: X-Robots-Tag:noindex,nofollow,nosnippet,noarchive,notranslate,noimageindex
traefik.frontend.redirect.entryPoint: https
traefik.frontend.entryPoint: http
traefik.backend: oauth
traefik.frontend.rule: Host:oauth.${DOMAINNAME},
traefik.port: 4181
traefik.docker.network: traefik
traefik.frontend.headers.SSLRedirect: "true"
traefik.frontend.headers.STSSeconds: 315360000
traefik.frontend.headers.browserXSSFilter: true"
traefik.frontend.headers.contentTypeNosniff: "true"
traefik.frontend.headers.forceSTSHeader: "true"
traefik.frontend.headers.SSLHost: oauth.${DOMAINNAME}
traefik.frontend.headers.SSLForceHost: "true"
traefik.frontend.headers.STSIncludeSubdomains: "true"
traefik.frontend.headers.STSPreload: "true"
traefik.frontend.headers.frameDeny: "true"
traefik.frontend.headers.customFrameOptionsValue: 'allow-from https:${DOMAINNAME}'
traefik.frontend.passHostHeader: "true"
traefik.frontend.headers.SSLForceHost: "true"
traefik.frontend.auth.forward.address: http://oauth:4181" # add this to any containers you want to protect (if possible, sometimes mobile apps dont work)
networks:
traefik:
driver: overlay
attachable: true
name: traefik
external: false