Browse Source

Pruebas para environment

politica
Celestino Rey 1 year ago
parent
commit
5fbc1b6da0
3 changed files with 6 additions and 1 deletions
  1. +3
    -0
      ReymotaPy/K8S/reymotapy-deployment.yaml
  2. +1
    -1
      ReymotaPy/servicios/lanza.sh
  3. +2
    -0
      ReymotaPy/servicios/reymotapy/__init__.py

+ 3
- 0
ReymotaPy/K8S/reymotapy-deployment.yaml View File

@ -38,6 +38,9 @@ spec:
- reymotapy:create_app() - reymotapy:create_app()
image: creylopez/reymotapy:1.0 image: creylopez/reymotapy:1.0
name: reymotapy name: reymotapy
env:
- name: SALUDO_DEMO
value: "Hola, mundo"
ports: ports:
- containerPort: 5000 - containerPort: 5000
name: reymotapy name: reymotapy


+ 1
- 1
ReymotaPy/servicios/lanza.sh View File

@ -1 +1 @@
python -m flask --app reymotapy run
python3 -m flask --app reymotapy run

+ 2
- 0
ReymotaPy/servicios/reymotapy/__init__.py View File

@ -49,6 +49,8 @@ def create_app():
print(f"Using Database: {app.config.get('DATABASE')}") print(f"Using Database: {app.config.get('DATABASE')}")
print(f"Directorio de uploads: {app.config.get('UPLOAD_FOLDER')}") print(f"Directorio de uploads: {app.config.get('UPLOAD_FOLDER')}")
print(f"instance: {app.instance_path}") print(f"instance: {app.instance_path}")
print(f"Saludo: {os.getenv('SALUDO_DEMO')}")
return app return app

Loading…
Cancel
Save