Update Containers/Docker/Docker Compose/Snipe-IT.md
This commit is contained in:
@ -3,6 +3,7 @@
|
|||||||
!!! warning
|
!!! 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`.
|
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"
|
```jsx title="docker-compose.yml"
|
||||||
version: '3.7'
|
version: '3.7'
|
||||||
|
|
||||||
@ -100,3 +101,35 @@ MAIL_AUTO_EMBED_METHOD='attachment'
|
|||||||
DATA_LOCATION=/srv/containers/snipe-it
|
DATA_LOCATION=/srv/containers/snipe-it
|
||||||
APP_TRUSTED_PROXIES=192.168.5.29
|
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
|
||||||
|
```
|
Reference in New Issue
Block a user