fix(traefik): update Traefik deployment
- Upgrade Traefik to version 2.10.4. - Remove the unused dashboard router and disable the dashboard. - Remove the now unsupported pilot token.
This commit is contained in:
parent
baf5f13c51
commit
032c080b99
6 changed files with 6 additions and 19 deletions
2
config
2
config
|
@ -1 +1 @@
|
||||||
Subproject commit 8f42ea727399d0fb3087eebfb4cb8c14ee73bb3f
|
Subproject commit 276d7777d1de147baf5c37c3578ef8384a68c63d
|
|
@ -30,7 +30,6 @@ type traefikConfig struct {
|
||||||
SharedMountPoint string `json:"sharedMountPoint"`
|
SharedMountPoint string `json:"sharedMountPoint"`
|
||||||
TlsHostDirectory string `json:"tlsHostDirectory"`
|
TlsHostDirectory string `json:"tlsHostDirectory"`
|
||||||
TlsContainerDirectory string `json:"tlsContainerDirectory"`
|
TlsContainerDirectory string `json:"tlsContainerDirectory"`
|
||||||
PilotToken string `json:"pilotToken"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type forgejoConfig struct {
|
type forgejoConfig struct {
|
||||||
|
|
|
@ -4,8 +4,6 @@ ADD traefik.yaml /flow/traefik/
|
||||||
|
|
||||||
ADD entrypoint.sh /
|
ADD entrypoint.sh /
|
||||||
|
|
||||||
ADD dynamic_dashboard.yaml /tmp/
|
|
||||||
|
|
||||||
RUN chmod +x /entrypoint.sh
|
RUN chmod +x /entrypoint.sh
|
||||||
|
|
||||||
CMD ["--configfile=/flow/traefik/traefik.yaml"]
|
CMD ["--configfile=/flow/traefik/traefik.yaml"]
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
---
|
|
||||||
http:
|
|
||||||
routers:
|
|
||||||
dashboard:
|
|
||||||
entryPoints:
|
|
||||||
- "https"
|
|
||||||
rule: "Host(`{{ .RootDomain }}`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
|
|
||||||
service: "api@internal"
|
|
|
@ -7,10 +7,10 @@ mkdir -p {{ .Traefik.SharedMountPoint }}/dynamic
|
||||||
chgrp {{ .FlowGID }} {{ .Traefik.SharedMountPoint }}/dynamic
|
chgrp {{ .FlowGID }} {{ .Traefik.SharedMountPoint }}/dynamic
|
||||||
chmod a-rwx,u+rwx,g+rwx {{ .Traefik.SharedMountPoint }}/dynamic
|
chmod a-rwx,u+rwx,g+rwx {{ .Traefik.SharedMountPoint }}/dynamic
|
||||||
|
|
||||||
# Move the dashboard config to the new directory.
|
# Move any dynamic config to the new directory.
|
||||||
if [ -f /tmp/dynamic_dashboard.yaml ]; then
|
for f in $( find /tmp -mindepth 1 -maxdepth 1 -type f -iname '*dynamic*.yaml' -exec basename {} \; ); do
|
||||||
mv /tmp/dynamic_dashboard.yaml {{ .Traefik.SharedMountPoint }}/dynamic/dynamic_dashboard.yaml
|
mv -f /tmp/${f} {{ .Traefik.SharedMountPoint }}/dynamic/${f}
|
||||||
fi
|
done
|
||||||
|
|
||||||
# first arg is `-f` or `--some-option`
|
# first arg is `-f` or `--some-option`
|
||||||
if [ "${1#-}" != "$1" ]; then
|
if [ "${1#-}" != "$1" ]; then
|
||||||
|
|
|
@ -4,7 +4,7 @@ global:
|
||||||
sendAnonymousUsage: {{ .Traefik.SendAnonymousUsage }}
|
sendAnonymousUsage: {{ .Traefik.SendAnonymousUsage }}
|
||||||
api:
|
api:
|
||||||
insecure: false
|
insecure: false
|
||||||
dashboard: true
|
dashboard: false
|
||||||
debug: false
|
debug: false
|
||||||
entryPoints:
|
entryPoints:
|
||||||
http:
|
http:
|
||||||
|
@ -32,5 +32,3 @@ certificatesResolvers:
|
||||||
tlsChallenge: {}
|
tlsChallenge: {}
|
||||||
log:
|
log:
|
||||||
level: "{{ .Traefik.LogLevel }}"
|
level: "{{ .Traefik.LogLevel }}"
|
||||||
pilot:
|
|
||||||
token: "{{ .Traefik.PilotToken }}"
|
|
||||||
|
|
Loading…
Reference in a new issue