diff --git a/roles/web-app-yourls/config/main.yml b/roles/web-app-yourls/config/main.yml index ef6f99c6..9d9b794a 100644 --- a/roles/web-app-yourls/config/main.yml +++ b/roles/web-app-yourls/config/main.yml @@ -9,7 +9,7 @@ oauth2_proxy: features: matomo: true css: true - desktop: true + desktop: true central_database: true oauth2: true logout: true @@ -34,7 +34,7 @@ server: docker: services: database: - enabled: true + enabled: true yourls: version: "latest" name: "yourls" diff --git a/roles/web-app-yourls/templates/docker-compose.yml.j2 b/roles/web-app-yourls/templates/docker-compose.yml.j2 index dbaa90b3..255d7ab8 100644 --- a/roles/web-app-yourls/templates/docker-compose.yml.j2 +++ b/roles/web-app-yourls/templates/docker-compose.yml.j2 @@ -2,9 +2,9 @@ application: {% set container_port = 80 %} -{% set container_healthcheck = 'http://127.0.0.1' ~ yourls_admin_location %} - image: "{{ yourls_image }}:{{ yourls_version }}" - container_name: "{{ yourls_container }}" +{% set container_healthcheck = YOURLS_ADMIN_LOCATION %} + image: "{{ YOURLS_IMAGE }}:{{ YOURLS_VERSION }}" + container_name: "{{ YOURLS_CONTAINER }}" {% include 'roles/docker-container/templates/base.yml.j2' %} ports: - "127.0.0.1:{{ ports.localhost.http[application_id] }}:{{ container_port }}" diff --git a/roles/web-app-yourls/templates/env.j2 b/roles/web-app-yourls/templates/env.j2 index 7383aa04..b23331b4 100644 --- a/roles/web-app-yourls/templates/env.j2 +++ b/roles/web-app-yourls/templates/env.j2 @@ -3,7 +3,7 @@ YOURLS_DB_USER: "{{ database_username }}" YOURLS_DB_PASS: "{{ database_password }}" YOURLS_DB_NAME: "{{ database_name }}" YOURLS_SITE: "{{ domains | get_url(application_id, WEB_PROTOCOL) }}" -YOURLS_USER: "{{ yourls_user }}" -YOURLS_PASS: "{{ yourls_password }}" +YOURLS_USER: "{{ YOURLS_USER }}" +YOURLS_PASS: "{{ YOURLS_PASSWORD }}" # The following deactivates the login mask for admins, if the oauth2 proxy is activated YOURLS_PRIVATE: "{{not (applications | get_app_conf(application_id, 'features.oauth2', False))}}" \ No newline at end of file diff --git a/roles/web-app-yourls/templates/redirect.conf.j2 b/roles/web-app-yourls/templates/redirect.conf.j2 index 990461af..40482af4 100644 --- a/roles/web-app-yourls/templates/redirect.conf.j2 +++ b/roles/web-app-yourls/templates/redirect.conf.j2 @@ -1,3 +1,3 @@ location = / { - return {{ yourls_landingpage_status_code }} {{ yourls_admin_location }}; + return {{ YOURLS_LANDINGPAGE_STATUS_CODE }} {{ YOURLS_ADMIN_LOCATION }}; } \ No newline at end of file diff --git a/roles/web-app-yourls/vars/main.yml b/roles/web-app-yourls/vars/main.yml index e41ef7be..39b02313 100644 --- a/roles/web-app-yourls/vars/main.yml +++ b/roles/web-app-yourls/vars/main.yml @@ -2,14 +2,15 @@ application_id: "web-app-yourls" database_type: "mariadb" -# Yourls Specific -yourls_user: "{{ applications | get_app_conf(application_id, 'users.administrator.username') }}" -yourls_password: "{{ applications | get_app_conf(application_id, 'credentials.administrator_password', True) }}" -yourls_version: "{{ applications | get_app_conf(application_id, 'docker.services.yourls.version', True) }}" -yourls_image: "{{ applications | get_app_conf(application_id, 'docker.services.yourls.image', True) }}" -yourls_container: "{{ applications | get_app_conf(application_id, 'docker.services.yourls.name', True) }}" -yourls_admin_location: "{{ applications | get_app_conf(application_id, 'server.locations.admin', True) }}" -yourls_landingpage_status_code: "{{ applications | get_app_conf(application_id, 'server.status_codes.landingpage', True) }}" - -# Nginx Specific +# Webserver proxy_extra_configuration: "{{ lookup('template', 'redirect.conf.j2') }}" + +# Yourls +YOURLS_USER: "{{ applications | get_app_conf(application_id, 'users.administrator.username') }}" +YOURLS_PASSWORD: "{{ applications | get_app_conf(application_id, 'credentials.administrator_password') }}" +YOURLS_VERSION: "{{ applications | get_app_conf(application_id, 'docker.services.yourls.version') }}" +YOURLS_IMAGE: "{{ applications | get_app_conf(application_id, 'docker.services.yourls.image') }}" +YOURLS_CONTAINER: "{{ applications | get_app_conf(application_id, 'docker.services.yourls.name') }}" +YOURLS_ADMIN_LOCATION: "{{ applications | get_app_conf(application_id, 'server.locations.admin') }}" +YOURLS_LANDINGPAGE_STATUS_CODE: "{{ applications | get_app_conf(application_id, 'server.status_codes.landingpage') }}" +