From 36041dbd70db7dab696430c70abfcc58efba3714 Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Wed, 7 Sep 2022 21:47:37 -0600 Subject: [PATCH] Trying to get simpleauth working --- homelab/Caddyfile | 5 +++-- homelab/docker-compose.yaml | 15 ++++++++++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/homelab/Caddyfile b/homelab/Caddyfile index c57e1a8..49730a2 100644 --- a/homelab/Caddyfile +++ b/homelab/Caddyfile @@ -8,8 +8,9 @@ import /run/secrets/caddy-users (restricted-access) { - basicauth { - import home-users + forward_auth simpleauth:8080 { + uri / + copy_headers Set-Cookie } } diff --git a/homelab/docker-compose.yaml b/homelab/docker-compose.yaml index 3ac090c..ff9b016 100644 --- a/homelab/docker-compose.yaml +++ b/homelab/docker-compose.yaml @@ -27,6 +27,16 @@ services: extra_hosts: - host.docker.internal:host-gateway + simpleauth: + image: ghcr.io/nealey/simpleauth + volumes: + - type: bind + source: /home/neale/src/simpleauth/static + target: /static + read_only: true + secrets: + - passwd + plex: image: ghcr.io/linuxserver/plex networks: @@ -141,7 +151,7 @@ configs: name: dave.yaml-v3 Caddyfile: file: Caddyfile - name: Caddyfile-v24 + name: Caddyfile-v27 index.html: file: index.html name: index.html-v12 @@ -150,6 +160,9 @@ secrets: caddy-users: file: secrets/caddy-users name: caddy-users-v2 + passwd: + file: secrets/passwd + name: passwd-v1 networks: hostnet: