fix(silverbullet): add traefik labels and make auth fields mandatory

This commit is contained in:
Nicolas Meienberger 2024-01-29 20:05:26 +01:00
parent 28ca0b166b
commit 41c3f0f3d1
2 changed files with 43 additions and 18 deletions

View File

@ -21,15 +21,15 @@
"label": "Username", "label": "Username",
"max": 50, "max": 50,
"min": 3, "min": 3,
"required": false, "required": true,
"env_variable": "SB_USER" "env_variable": "SB_USER"
}, },
{ {
"type": "password", "type": "password",
"label": "Password", "label": "Password",
"max": 50, "max": 50,
"min": 3, "min": 8,
"required": false, "required": true,
"env_variable": "SB_PASSWORD" "env_variable": "SB_PASSWORD"
} }
], ],

View File

@ -1,4 +1,4 @@
version: '0.5' version: '3.9'
services: services:
silverbullet: silverbullet:
@ -14,3 +14,28 @@ services:
- ${APP_PORT}:3000 - ${APP_PORT}:3000
networks: networks:
- tipi_main_network - tipi_main_network
labels:
# Main
traefik.enable: true
traefik.http.middlewares.silverbullet-web-redirect.redirectscheme.scheme: https
traefik.http.services.silverbullet.loadbalancer.server.port: 3000
# Web
traefik.http.routers.silverbullet-insecure.rule: Host(`${APP_DOMAIN}`)
traefik.http.routers.silverbullet-insecure.entrypoints: web
traefik.http.routers.silverbullet-insecure.service: silverbullet
traefik.http.routers.silverbullet-insecure.middlewares: silverbullet-web-redirect
# Websecure
traefik.http.routers.silverbullet.rule: Host(`${APP_DOMAIN}`)
traefik.http.routers.silverbullet.entrypoints: websecure
traefik.http.routers.silverbullet.service: silverbullet
traefik.http.routers.silverbullet.tls.certresolver: myresolver
# Local domain
traefik.http.routers.silverbullet-local-insecure.rule: Host(`silverbullet.${LOCAL_DOMAIN}`)
traefik.http.routers.silverbullet-local-insecure.entrypoints: web
traefik.http.routers.silverbullet-local-insecure.service: silverbullet
traefik.http.routers.silverbullet-local-insecure.middlewares: silverbullet-web-redirect
# Local domain secure
traefik.http.routers.silverbullet-local.rule: Host(`silverbullet.${LOCAL_DOMAIN}`)
traefik.http.routers.silverbullet-local.entrypoints: websecure
traefik.http.routers.silverbullet-local.service: silverbullet
traefik.http.routers.silverbullet-local.tls: true