Browse Source

Pongo versión en settings.py

Celestino Rey 1 year ago
parent
commit
3ed41a1efe
4 changed files with 7 additions and 5 deletions
  1. 2 1
      K8S/Makefile
  2. 2 2
      K8S/reymota-deployment.yaml
  3. 1 1
      README.md
  4. 2 1
      src/reymota/settings.py

+ 2 - 1
K8S/Makefile

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

+ 2 - 2
K8S/reymota-deployment.yaml

@@ -39,8 +39,8 @@ spec:
         name: reymota
         image: $REGISTRY/reymota-$ARQUITECTURA:$IMG_VERSION
         env:
-        - name: VERSION
-          value: "$IMG_VERSION"
+        - name: APP_VERSION
+          value: "$APP_VERSION"
         - name: OPENSHIFT
           value: "False"
         - name: ENVIRONMENT

+ 1 - 1
README.md

@@ -12,7 +12,7 @@ Crear un proyecto.
 
 A continuación añadir una app desde Agregar, importar desde git.
 
-    oc new-app http://gitea.reymota.es/creylopez/ReyMotaAppsOC.git -e DEBUG="False" -e OPENSHIFT="True" --name='reymota'
+    oc new-app http://gitea.reymota.es/creylopez/ReyMotaAppsOC.git -e APP_VERSION="12.0.0" -e DEBUG="False" -e OPENSHIFT="True" --name='reymota'
 
 Tal y como está la estructura de directorios, deberia detectar automáticamente una compilación Python
 

+ 2 - 1
src/reymota/settings.py

@@ -14,7 +14,8 @@ from pathlib import Path
 import os
 import logging
 
-APP_VERSION = "11.0.2"
+# 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