Optimized yourls variables and healthcheck

This commit is contained in:
2025-08-31 20:38:02 +02:00
parent aa2eb53776
commit bb0530c2ac
5 changed files with 19 additions and 18 deletions

View File

@@ -9,7 +9,7 @@ oauth2_proxy:
features: features:
matomo: true matomo: true
css: true css: true
desktop: true desktop: true
central_database: true central_database: true
oauth2: true oauth2: true
logout: true logout: true
@@ -34,7 +34,7 @@ server:
docker: docker:
services: services:
database: database:
enabled: true enabled: true
yourls: yourls:
version: "latest" version: "latest"
name: "yourls" name: "yourls"

View File

@@ -2,9 +2,9 @@
application: application:
{% set container_port = 80 %} {% set container_port = 80 %}
{% set container_healthcheck = 'http://127.0.0.1' ~ yourls_admin_location %} {% set container_healthcheck = YOURLS_ADMIN_LOCATION %}
image: "{{ yourls_image }}:{{ yourls_version }}" image: "{{ YOURLS_IMAGE }}:{{ YOURLS_VERSION }}"
container_name: "{{ yourls_container }}" container_name: "{{ YOURLS_CONTAINER }}"
{% include 'roles/docker-container/templates/base.yml.j2' %} {% include 'roles/docker-container/templates/base.yml.j2' %}
ports: ports:
- "127.0.0.1:{{ ports.localhost.http[application_id] }}:{{ container_port }}" - "127.0.0.1:{{ ports.localhost.http[application_id] }}:{{ container_port }}"

View File

@@ -3,7 +3,7 @@ YOURLS_DB_USER: "{{ database_username }}"
YOURLS_DB_PASS: "{{ database_password }}" YOURLS_DB_PASS: "{{ database_password }}"
YOURLS_DB_NAME: "{{ database_name }}" YOURLS_DB_NAME: "{{ database_name }}"
YOURLS_SITE: "{{ domains | get_url(application_id, WEB_PROTOCOL) }}" YOURLS_SITE: "{{ domains | get_url(application_id, WEB_PROTOCOL) }}"
YOURLS_USER: "{{ yourls_user }}" YOURLS_USER: "{{ YOURLS_USER }}"
YOURLS_PASS: "{{ yourls_password }}" YOURLS_PASS: "{{ YOURLS_PASSWORD }}"
# The following deactivates the login mask for admins, if the oauth2 proxy is activated # 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))}}" YOURLS_PRIVATE: "{{not (applications | get_app_conf(application_id, 'features.oauth2', False))}}"

View File

@@ -1,3 +1,3 @@
location = / { location = / {
return {{ yourls_landingpage_status_code }} {{ yourls_admin_location }}; return {{ YOURLS_LANDINGPAGE_STATUS_CODE }} {{ YOURLS_ADMIN_LOCATION }};
} }

View File

@@ -2,14 +2,15 @@
application_id: "web-app-yourls" application_id: "web-app-yourls"
database_type: "mariadb" database_type: "mariadb"
# Yourls Specific # Webserver
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
proxy_extra_configuration: "{{ lookup('template', 'redirect.conf.j2') }}" 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') }}"