diff --git a/JugarAlPadel/K8S/Makefile b/JugarAlPadel/K8S/Makefile index bdc5197..c7e0474 100644 --- a/JugarAlPadel/K8S/Makefile +++ b/JugarAlPadel/K8S/Makefile @@ -2,7 +2,7 @@ export ARQUITECTURA := $(shell lscpu |grep itectur | tr -d ' '| cut -f2 -d':') #export REGISTRY=localhost:5000 export REGISTRY=registry.reymota.es -export IMG_VERSION = 0.70 +export IMG_VERSION = 0.70.1 export IMG_NGINX_VERSION = 2.3 # limpia todo diff --git a/JugarAlPadel/K8S/Makefile.local b/JugarAlPadel/K8S/Makefile.local deleted file mode 100644 index 90d8c9c..0000000 --- a/JugarAlPadel/K8S/Makefile.local +++ /dev/null @@ -1,58 +0,0 @@ -export ARQUITECTURA := $(shell lscpu |grep itectur | tr -d ' '| cut -f2 -d':') -export REGISTRY=localhost:30500 -#export REGISTRY=registry.reymota.es - -export IMG_VERSION = 1.31 -export IMG_NGINX_VERSION = 2.4 - -# limpia todo -all: imagen clean install - -imagen: - cd ../; make - -install: - -kubectl create -f namespace.yaml - -kubectl create -f reg-secret.yaml - -kubectl create -f env-prod-configmap-local.yaml - -kubectl create -f env-prod-db-configmap.yaml - - -kubectl create -f pv-local-jugaralpadel.yaml - -kubectl create -f jugaralpadel-prod-persistentvolumeclaim.yaml - -kubectl create -f static-volume-persistentvolumeclaim.yaml - -kubectl create -f postgres-data-persistentvolumeclaim.yaml - - -kubectl create -f db-deployment.yaml - -kubectl create -f db-service.yaml - - -envsubst < jugaralpadel-deployment.yaml |kubectl create -f - - -envsubst < nginx-deployment.yaml |kubectl create -f - - -kubectl create -f nginx-service.yaml - -clean: - -envsubst < nginx-deployment.yaml |kubectl delete -f - - -kubectl delete -f nginx-service.yaml - -envsubst < jugaralpadel-deployment.yaml |kubectl delete -f - - - -kubectl delete -f db-deployment.yaml - -kubectl delete -f db-service.yaml - - -kubectl delete -f env-prod-configmap-local.yaml - -kubectl delete -f env-prod-db-configmap.yaml - - -kubectl delete -f postgres-data-persistentvolumeclaim.yaml - -kubectl delete -f static-volume-persistentvolumeclaim.yaml - -kubectl delete -f jugaralpadel-prod-persistentvolumeclaim.yaml - -kubectl delete -f pv-local-jugaralpadel.yaml - -kubectl delete -f reg-secret.yaml - -kubectl delete -f namespace.yaml - -nginx: - cd ../nginx; make - -verimg: - docker run -it ${REGISTRY}/jugaralpadel-${ARQUITECTURA}:${IMG_VERSION} bash - -backup: - kubectl --kubeconfig /home/creylopez/.kube/config -n jugaralpadel exec -ti deployment.apps/db -- /usr/lib/postgresql/15/bin/pg_dump --username=creylopez --dbname=jugaralpadel > jugaralpadel-$(IMG_VERSION).sql - diff --git a/JugarAlPadel/K8S/Makefile.topolvm b/JugarAlPadel/K8S/Makefile.topolvm deleted file mode 100644 index 4a21d86..0000000 --- a/JugarAlPadel/K8S/Makefile.topolvm +++ /dev/null @@ -1,56 +0,0 @@ -export ARQUITECTURA := $(shell lscpu |grep itectur | tr -d ' '| cut -f2 -d':') -export REGISTRY=localhost:30500 -#export REGISTRY=registry.reymota.es - -export IMG_VERSION = 1.29 -export IMG_NGINX_VERSION = 2.4 - -# limpia todo -all: imagen clean install - -imagen: - cd ../; make - -install: - -kubectl create -f namespace.yaml - -kubectl create -f reg-secret.yaml - -kubectl create -f env-prod-configmap-local.yaml - -kubectl create -f env-prod-db-configmap.yaml - - -kubectl create -f jugaralpadel-topolvm-pvc.yaml - -kubectl create -f static-topolvm-pvc.yaml - -kubectl create -f postgres-topolvm-pvc.yaml - - -kubectl create -f db-deployment.yaml - -kubectl create -f db-service.yaml - - -envsubst < jugaralpadel-deployment.yaml |kubectl create -f - - -envsubst < nginx-deployment.yaml |kubectl create -f - - -kubectl create -f nginx-service.yaml - -clean: - -envsubst < nginx-deployment.yaml |kubectl delete -f - - -kubectl delete -f nginx-service.yaml - -envsubst < jugaralpadel-deployment.yaml |kubectl delete -f - - - -kubectl delete -f db-deployment.yaml - -kubectl delete -f db-service.yaml - - -kubectl delete -f env-prod-configmap-local.yaml - -kubectl delete -f env-prod-db-configmap.yaml - - -kubectl delete -f jugaralpadel-topolvm-pvc.yaml - -kubectl delete -f static-topolvm-pvc.yaml - -kubectl delete -f postgres-topolvm-pvc.yaml - -kubectl delete -f reg-secret.yaml - -kubectl delete -f namespace.yaml - -nginx: - cd ../nginx; make - -verimg: - docker run -it ${REGISTRY}/jugaralpadel-${ARQUITECTURA}:${IMG_VERSION} bash - -backup: - kubectl --kubeconfig /home/creylopez/.kube/config -n jugaralpadel exec -ti deployment.apps/db -- /usr/lib/postgresql/15/bin/pg_dump --username=creylopez --dbname=jugaralpadel > jugaralpadel-$(IMG_VERSION).sql - diff --git a/JugarAlPadel/K8S/env-prod-configmap-local.yaml b/JugarAlPadel/K8S/env-prod-configmap-local.yaml deleted file mode 100644 index 065ab18..0000000 --- a/JugarAlPadel/K8S/env-prod-configmap-local.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: v1 -data: - DEBUG: "True" - ENTORNO: "Pruebas" - DJANGO_ALLOWED_HOSTS: "jugaralpadel.ddns.net vmcluster reymota.es k8s-server localhost 127.0.0.1 [::1]" - CSRF_TRUSTED_ORIGINS: "https://jugaralpadel.ddns.net http://vmcluster" - SECRET_KEY: change_me - SQL_DATABASE: jugaralpadel - SQL_ENGINE: django.db.backends.postgresql - SQL_HOST: db - SQL_PASSWORD: Dsa-0213 - SQL_PORT: "5432" - SQL_USER: creylopez - DATABASE: postgres -kind: ConfigMap -metadata: - labels: - io.kompose.service: web-env-prod - name: env-prod - namespace: jugaralpadel diff --git a/JugarAlPadel/K8S/env-prod-configmap.yaml b/JugarAlPadel/K8S/env-prod-configmap.yaml index 9dbd261..f5def33 100644 --- a/JugarAlPadel/K8S/env-prod-configmap.yaml +++ b/JugarAlPadel/K8S/env-prod-configmap.yaml @@ -1,6 +1,6 @@ apiVersion: v1 data: - DEBUG: "True" + DEBUG: "False" ENTORNO: "Producción" DJANGO_ALLOWED_HOSTS: "jugaralpadel.rancher.reymota.lab jugaralpadel.es jugaralpadel.ddns.net vmcluster k8s-server localhost 127.0.0.1 [::1]" CSRF_TRUSTED_ORIGINS: "http://jugaralpadel.rancher.reymota.lab https://jugaralpadel.rancher.reymota.lab https://jugaralpadel.es http://vmcluster" diff --git a/JugarAlPadel/gestion_reservas/eventos/forms.py b/JugarAlPadel/gestion_reservas/eventos/forms.py index 60849e5..109b7db 100644 --- a/JugarAlPadel/gestion_reservas/eventos/forms.py +++ b/JugarAlPadel/gestion_reservas/eventos/forms.py @@ -21,6 +21,16 @@ class ListaEsperaForm(forms.ModelForm): class MensajeCorreoForm(forms.Form): - asunto = forms.CharField(label="Asunto", max_length=200, required=True, widget=forms.TextInput(attrs={'class': 'form-control'})) - mensaje = forms.CharField(label="Mensaje", widget=forms.Textarea(attrs={'class': 'form-control', 'rows': 4}), required=True) + asunto = forms.CharField( + label="Asunto", + max_length=200, + required=True, + widget=forms.TextInput(attrs={'class': 'form-control'}) + ) + + mensaje = forms.CharField( + label="Mensaje", + widget=forms.Textarea(attrs={'class': 'form-control', 'rows': 16}), + required=True + )