diff --git a/paperless/docker-compose.env.jinja b/paperless/docker-compose.env.jinja index 2b48bf5..1929b72 100644 --- a/paperless/docker-compose.env.jinja +++ b/paperless/docker-compose.env.jinja @@ -9,12 +9,10 @@ PAPERLESS_TIKA_GOTENBERG_ENDPOINT={{ salt['pillar.get']('paperless:webserver:env PAPERLESS_APPS=allauth.socialaccount.providers.openid_connect PAPERLESS_SOCIALACCOUNT_PROVIDERS={"key": {"value": 3}} -{% client_secret = salt['pillar.get']('paperless:webserver:keycloak:client_secret', '') %} -{% set oauth_server = salt['pillar.get']('paperless:webserver:keycloak:server_url', 'https:///realms//.well-known/openid-configuration') %} -{% set PAPERLESS_SOCIALACCOUNT_PROVIDERS_ = -{'openid_connect':{'APPS':[{'provider_id': 'keycloak', 'name': 'Keycloak', -'client_id': 'paperless', 'secret': client_secret, 'settings':{'server_url': -oauth_server}}]}} | tojson %} +PAPERLESS_CLIENT_SECRET=salt['pillar.get']('paperless:webserver:keycloak:client_secret', '') +PAPERLESS_SERVER_URL=salt['pillar.get']('paperless:webserver:keycloak:server_url', 'https:///realms//.well-known/openid-configuration') + +# PAPERLESS_SOCIALACCOUNT_PROVIDERS_={'openid_connect':{'APPS':[{'provider_id': 'keycloak', 'name': 'Keycloak', 'client_id': 'paperless', 'secret': $PAPERLESS_CLIENT_SECRET, 'settings':{'server_url': $PAPERLESS_SERVER_URL}}]}} PAPERLESS_DISABLE_REGULAR_LOGIN={{ salt['pillar.get']('paperless:webserver:environment:disable_regular_login', 'true') }} PAPERLESS_REDIRECT_LOGIN_TO_SSO={{ salt['pillar.get']('paperless:webserver:environment:redirect_login_to_sso', 'true') }} diff --git a/paperless/init.sls b/paperless/init.sls index 9dfbc04..20e34e9 100644 --- a/paperless/init.sls +++ b/paperless/init.sls @@ -104,17 +104,17 @@ tika-docker-container-running: paperless-docker-compose-env-file-present: file.managed: - - name: /opt/docker-compose.env + - name: /opt/paperless/docker-compose.env - template: jinja - source: salt://paperless/docker-compose.env.jinja paperless-docker-compose-file-present: file.managed: - - name: /opt/docker-compose.yml + - name: /opt/paperless/docker-compose.yml - template: jinja - - source: salt://docker-compose.yml.jinja + - source: salt://paperless/docker-compose.yml.jinja paperless-docker-compose-up: module.run: - dockercompose.up: - - path: /opt/docker-compose.yml + - path: /opt/paperless/docker-compose.yml