From 1dbd714a5663783cae69c5d4b3c4649304b54bb8 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Sun, 31 Aug 2025 21:48:24 +0200 Subject: [PATCH] yourls: move container_port/healthcheck to vars; listen on 8080 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Removed hardcoded container_port/container_healthcheck from docker-compose.yml.j2 • Added container_port=8080 and container_healthcheck to vars/main.yml • Rationale: current image listens on 8080; centralizes settings in vars Ref: https://chatgpt.com/share/68b4a69d-e4b0-800f-a4f8-6c8e4fc55ee4 --- roles/web-app-yourls/templates/docker-compose.yml.j2 | 2 -- roles/web-app-yourls/vars/main.yml | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/roles/web-app-yourls/templates/docker-compose.yml.j2 b/roles/web-app-yourls/templates/docker-compose.yml.j2 index 255d7ab8..febe9825 100644 --- a/roles/web-app-yourls/templates/docker-compose.yml.j2 +++ b/roles/web-app-yourls/templates/docker-compose.yml.j2 @@ -1,8 +1,6 @@ {% include 'roles/docker-compose/templates/base.yml.j2' %} application: -{% set container_port = 80 %} -{% set container_healthcheck = YOURLS_ADMIN_LOCATION %} image: "{{ YOURLS_IMAGE }}:{{ YOURLS_VERSION }}" container_name: "{{ YOURLS_CONTAINER }}" {% include 'roles/docker-container/templates/base.yml.j2' %} diff --git a/roles/web-app-yourls/vars/main.yml b/roles/web-app-yourls/vars/main.yml index 39b02313..a6b9ec12 100644 --- a/roles/web-app-yourls/vars/main.yml +++ b/roles/web-app-yourls/vars/main.yml @@ -14,3 +14,6 @@ YOURLS_CONTAINER: "{{ applications | get_app_conf(application_id, 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') }}" +# Container +container_port: 8080 +container_healthcheck: "{{ '' | safe_join(YOURLS_ADMIN_LOCATION) }}/"