From d74db62bc2acb30dff8da12aac1067f7b68f6bb7 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Thu, 7 Mar 2024 14:12:25 +0900 Subject: [PATCH] updated omv-svc01.yml --- docker-stack/omv-svc01.yml | 37 +++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/docker-stack/omv-svc01.yml b/docker-stack/omv-svc01.yml index 30f7d5e..fb6413e 100644 --- a/docker-stack/omv-svc01.yml +++ b/docker-stack/omv-svc01.yml @@ -14,7 +14,7 @@ networks: services: traefik-service: - image: docker.io/traefik:2.10.1 + image: docker.io/traefik:2.11.0 hostname: traefik-service-host tty: true volumes: @@ -55,8 +55,14 @@ services: condition: on-failure command: - --log.level=INFO - - --accessLog + - --accesslog #- --accesslog.filepath=/config/logs/access.log + - --accesslog.format=common + + - --accesslog.fields.defaultmode=keep + - --accesslog.fields.headers.defaultmode=keep + - --accesslog.fields.headers.names.X-Forwarded-For=keep + - --accesslog.fields.headers.names.RequestHost=keep - --api.dashboard=true - --api.insecure=true - --ping=true @@ -107,7 +113,7 @@ services: ##- traefik.http.services.web-service.loadbalancer.sticky.cookie.name=web-sticker gitea-service: - image: docker.io/gitea/gitea:1.20.4 + image: docker.io/gitea/gitea:1.21.7 hostname: gitea-service-host tty: true environment: @@ -157,17 +163,21 @@ services: - traefik.http.routers.gitea-secure.entrypoints=websec - traefik.http.routers.gitea-secure.rule=Host(`code.miflux.com`) - traefik.http.routers.gitea-secure.tls=true - - traefik.http.routers.gitea-secure.middlewares=gitea-to-codepot-diff-to-file,gitea-to-codepot + ##- traefik.http.routers.gitea-secure.middlewares=gitea-to-codepot-diff-to-file,gitea-to-codepot + - traefik.http.routers.gitea-secure.middlewares=cpot-old-url-to-gitea #- traefik.http.routers.gitea-plain.entrypoints=web #- traefik.http.routers.gitea-plain.rule=Host(`code.miflux.com`) #- traefik.http.routers.gitea-plain.tls=false - traefik.http.services.gitea-service.loadbalancer.server.port=3000 - traefik.http.services.gitea-service.loadbalancer.sticky.cookie=true - traefik.http.services.gitea-service.loadbalancer.sticky.cookie.name=gitea-sticker - - traefik.http.middlewares.gitea-to-codepot-diff-to-file.redirectregex.regex=^https://code.miflux.com/code/(fulldiff|diff)/(.*)$ - - traefik.http.middlewares.gitea-to-codepot-diff-to-file.redirectregex.replacement=https://cpot.miflux.com/code/file/$${2} - - traefik.http.middlewares.gitea-to-codepot.redirectregex.regex=^https://code.miflux.com/code/(.*)$ - - traefik.http.middlewares.gitea-to-codepot.redirectregex.replacement=https://cpot.miflux.com/code/$${1} + ##- traefik.http.middlewares.gitea-to-codepot-diff-to-file.redirectregex.regex=^https://code.miflux.com/code/(fulldiff|diff)/(.*)$ + ##- traefik.http.middlewares.gitea-to-codepot-diff-to-file.redirectregex.replacement=https://cpot.miflux.com/code/file/$${2} + + ##- traefik.http.middlewares.gitea-to-codepot.redirectregex.regex=^https://code.miflux.com/code/(.*)$ + ##- traefik.http.middlewares.gitea-to-codepot.redirectregex.replacement=https://cpot.miflux.com/code/$${1} + - traefik.http.middlewares.cpot-old-url-to-gitea.redirectregex.regex=^https://code.miflux.com/(code|file|issue|wiki|project|graph)/[^/]+/([^/]+)(/.+)*$ + - traefik.http.middlewares.cpot-old-url-to-gitea.redirectregex.replacement=https://code.miflux.com/hyung-hwan/$${2} - traefik.http.middlewares.redirect-merisia-benjaminrancourt.redirectregex.permanent=false codepot-service: @@ -178,12 +188,14 @@ services: - --port=80 - --hide-index-page=yes - --https-redirected=yes + - --mpm-prefork-max-workers=6 networks: - traefik-network volumes: - type: volume source: codepot-data-volume target: /var/lib/codepot + logging: driver: "local" options: @@ -202,12 +214,20 @@ services: - traefik.http.routers.codepot-secure.entrypoints=websec - traefik.http.routers.codepot-secure.rule=Host(`cpot.miflux.com`) - traefik.http.routers.codepot-secure.tls=true + - traefik.http.routers.codepot-secure.middlewares=block-svn-access,cpot-proj-to-gitea,cpot-rest-to-gitea #- traefik.http.routers.codepot-plain.entrypoints=web #- traefik.http.routers.codepot-plain.rule=Host(`cpot.miflux.com`) #- traefik.http.routers.codepot-secure.tls=false - traefik.http.services.codepot.loadbalancer.sticky.cookie=true - traefik.http.services.codepot.loadbalancer.sticky.cookie.name=codepot-sticker - traefik.http.services.codepot.loadbalancer.server.port=80 + # - block access to svn + - traefik.http.middlewares.block-svn-access.redirectregex.regex=^https://cpot.miflux.com/svn/(.*)$ + - traefik.http.middlewares.block-svn-access.redirectregex.replacement=https://cpot.miflux.com/svn/ + - traefik.http.middlewares.cpot-proj-to-gitea.redirectregex.regex=^https://cpot.miflux.com/[^/]+/[^/]+/([^/]+)(/.+)*$ + - traefik.http.middlewares.cpot-proj-to-gitea.redirectregex.replacement=https://code.miflux.com/hyung-hwan/$${1} + - traefik.http.middlewares.cpot-rest-to-gitea.redirectregex.regex=^https://cpot.miflux.com/(.*)$ + - traefik.http.middlewares.cpot-rest-to-gitea.redirectregex.replacement=https://code.miflux.com/hyung-hwan/ drone-service: image: docker.io/drone/drone:2 @@ -286,3 +306,4 @@ services: memory: 1GB restart_policy: condition: on-failure +