mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-09-07 18:57:12 +02:00
Optimized yourls variables and healthcheck
This commit is contained in:
@@ -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"
|
||||
|
@@ -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 }}"
|
||||
|
@@ -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))}}"
|
@@ -1,3 +1,3 @@
|
||||
location = / {
|
||||
return {{ yourls_landingpage_status_code }} {{ yourls_admin_location }};
|
||||
return {{ YOURLS_LANDINGPAGE_STATUS_CODE }} {{ YOURLS_ADMIN_LOCATION }};
|
||||
}
|
@@ -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') }}"
|
||||
|
||||
|
Reference in New Issue
Block a user