From 475944cb915961191e5cd32a712629ed48238780 Mon Sep 17 00:00:00 2001 From: Nicole Rappe Date: Thu, 11 Jan 2024 23:07:33 -0700 Subject: [PATCH] Update Containers/Docker/Docker Compose/Snipe-IT.md --- Containers/Docker/Docker Compose/Snipe-IT.md | 33 ++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/Containers/Docker/Docker Compose/Snipe-IT.md b/Containers/Docker/Docker Compose/Snipe-IT.md index 3f9cddf..a99800d 100644 --- a/Containers/Docker/Docker Compose/Snipe-IT.md +++ b/Containers/Docker/Docker Compose/Snipe-IT.md @@ -3,6 +3,7 @@ !!! warning The Snipe-IT container will attempt to launch after the MariaDB container starts, but MariaDB takes a while set itself up before it can accept connections; as a result, Snipe-IT will fail to initialize the database. Just wait about 30 seconds after deploying the stack, then restart the Snipe-IT container to initialize the database. You will know it worked if you see notes about data being `Migrated`. +## Docker Configuration ```jsx title="docker-compose.yml" version: '3.7' @@ -100,3 +101,35 @@ MAIL_AUTO_EMBED_METHOD='attachment' DATA_LOCATION=/srv/containers/snipe-it APP_TRUSTED_PROXIES=192.168.5.29 ``` + +## Traefik Reverse Proxy Configuration +If the container does not run on the same host as Traefik, you will need to manually add configuration to Traefik's dynamic config file, outlined below. +``` yaml +http: + routers: + assets: + entryPoints: + - websecure + rule: Host(`assets.bunny-lab.io`) + service: assets + tls: + certResolver: letsencrypt + middlewares: + - assets + + middlewares: + assets: + headers: + customRequestHeaders: + X-Forwarded-Proto: https + X-Forwarded-Host: assets.bunny-lab.io + customResponseHeaders: + X-Custom-Header: CustomValue # Example of a static header + + services: + assets: + loadBalancer: + servers: + - url: http://192.168.5.50:80 + passHostHeader: true +``` \ No newline at end of file