Browse Source

Pone versión según si es openshift o no

main
Celestino Rey 7 months ago
parent
commit
f19ff72b3c
2 changed files with 9 additions and 7 deletions
  1. +1
    -7
      Dockerfile.k8s
  2. +8
    -0
      src/templates/acerca_de.html

+ 1
- 7
Dockerfile.k8s View File

@ -33,9 +33,6 @@ RUN pip wheel --no-cache-dir --no-deps --wheel-dir /app/wheels -r requirements.t
FROM python:3.11.4-slim-buster FROM python:3.11.4-slim-buster
# create the app user
#RUN addgroup --system app && adduser --system --group app
# create the appropriate directories # create the appropriate directories
ENV APP_HOME=/app ENV APP_HOME=/app
RUN mkdir -p $APP_HOME RUN mkdir -p $APP_HOME
@ -56,11 +53,8 @@ COPY ./entrypoint.sh .
# copy project # copy project
COPY . $APP_HOME COPY . $APP_HOME
# chown all the files to the app user
#RUN chown -R app:app $APP_HOME
# change to the app user # change to the app user
#USER app
WORKDIR $APP_HOME/src WORKDIR $APP_HOME/src
# run entrypoint.sh # run entrypoint.sh


+ 8
- 0
src/templates/acerca_de.html View File

@ -1,5 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load filtros_de_entorno %}
{% block content %} {% block content %}
<div class="container-xl"> <div class="container-xl">
<h1 class="app-page-title">Acerca de...</h1> <h1 class="app-page-title">Acerca de...</h1>
@ -10,7 +12,13 @@
<ul class="list-unstyled"> <ul class="list-unstyled">
<li><strong>Nombre de la aplicación:</strong> {{ app_name }}</li> <li><strong>Nombre de la aplicación:</strong> {{ app_name }}</li>
<li><strong>Versión:</strong> {{ app_version }}</li> <li><strong>Versión:</strong> {{ app_version }}</li>
{% if 'OPENSHIFT'|muestra_version == 'True' %}
<li><strong>Versión de la imagen:</strong> openshift </li>
{% else %}
<li><strong>Versión de la imagen:</strong> {{ img_version }}</li> <li><strong>Versión de la imagen:</strong> {{ img_version }}</li>
{% endif %}
</ul> </ul>
</div><!--//app-card-body--> </div><!--//app-card-body-->
</div><!--//app-card--> </div><!--//app-card-->


Loading…
Cancel
Save