diff --git a/apps/silverbullet/config.json b/apps/silverbullet/config.json index 75bfa869..7127ee1f 100644 --- a/apps/silverbullet/config.json +++ b/apps/silverbullet/config.json @@ -21,15 +21,15 @@ "label": "Username", "max": 50, "min": 3, - "required": false, + "required": true, "env_variable": "SB_USER" }, { "type": "password", "label": "Password", - "max": 50, - "min": 3, - "required": false, + "max": 50, + "min": 8, + "required": true, "env_variable": "SB_PASSWORD" } ], diff --git a/apps/silverbullet/docker-compose.yml b/apps/silverbullet/docker-compose.yml index ffc1df80..8df3ff80 100644 --- a/apps/silverbullet/docker-compose.yml +++ b/apps/silverbullet/docker-compose.yml @@ -1,16 +1,41 @@ -version: '0.5' +version: '3.9' services: - silverbullet: - image: zefhemel/silverbullet:0.6.0 - container_name: 'silverbullet' - restart: unless-stopped - volumes: - - /etc/localtime:/etc/localtime:ro - - ${APP_DATA_DIR}/space:/space - environment: - - SB_USER=${SB_USER}:${SB_PASSWORD} - ports: - - ${APP_PORT}:3000 - networks: - - tipi_main_network + silverbullet: + image: zefhemel/silverbullet:0.6.0 + container_name: 'silverbullet' + restart: unless-stopped + volumes: + - /etc/localtime:/etc/localtime:ro + - ${APP_DATA_DIR}/space:/space + environment: + - SB_USER=${SB_USER}:${SB_PASSWORD} + ports: + - ${APP_PORT}:3000 + networks: + - 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