Browse Source

Versión como variable de entorno en settings

politica
Celestino Rey 7 months ago
parent
commit
9396c66d11
4 changed files with 7 additions and 6 deletions
  1. +2
    -1
      JugarAlPadel/K8S/Makefile
  2. +2
    -2
      JugarAlPadel/K8S/jugaralpadel-deployment.yaml
  3. +1
    -2
      JugarAlPadel/gestion_reservas/gestion_reservas/settings.py
  4. +2
    -1
      JugarAlPadel/gestion_reservas/templates/_branding.html

+ 2
- 1
JugarAlPadel/K8S/Makefile View File

@ -1,8 +1,9 @@
export ARQUITECTURA := $(shell lscpu |grep itectur | tr -d ' '| cut -f2 -d':')
export REGISTRY=registry.reymota.es
export IMG_VERSION = 0.70.44
export IMG_VERSION = 0.70.46
export IMG_NGINX_VERSION = 2.3
export APP_VERSION = 12.0
# limpia todo
all: imagen clean install


+ 2
- 2
JugarAlPadel/K8S/jugaralpadel-deployment.yaml View File

@ -39,8 +39,8 @@ spec:
name: jugaralpadel
image: $REGISTRY/jugaralpadel-$ARQUITECTURA:$IMG_VERSION
env:
- name: VERSION
value: "$IMG_VERSION"
- name: APP_VERSION
value: "$APP_VERSION"
- name: DEBUG
valueFrom:
configMapKeyRef:


+ 1
- 2
JugarAlPadel/gestion_reservas/gestion_reservas/settings.py View File

@ -14,8 +14,7 @@ from pathlib import Path
import os
import logging
APP_VERSION = "11.0.2"
APP_VERSION = os.environ.get("APP_VERSION", "0.0.0-dev") # Valor por defecto si no está definido
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent


+ 2
- 1
JugarAlPadel/gestion_reservas/templates/_branding.html View File

@ -3,6 +3,7 @@
{% load filtros_de_entorno %}
<div class="app-branding">
<a class="app-logo" href="{% url 'principal' %}"><img class="logo-icon me-2" src="{% static 'images/palapadel.svg' %}" alt="logo"><span class="logo-text">JUGAR AL PADEL</span><span style="color: blue; font-size: 14px;"> v {{ "VERSION"|muestra_version }}</span></a>
<a class="app-logo" href="{% url 'principal' %}"><img class="logo-icon me-2" src="{% static 'images/palapadel.svg' %}" alt="logo"><span class="logo-text">JUGAR AL PADEL</span></a>
<span style="color: blue; font-size: 14px;">Versión: {{ APP_VERSION }}</span></a>
</div><!--//app-branding-->

Loading…
Cancel
Save