diff --git a/K8S/nginx-deployment.yaml b/K8S/nginx-deployment.yaml deleted file mode 100644 index 358e2c6..0000000 --- a/K8S/nginx-deployment.yaml +++ /dev/null @@ -1,46 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - kompose.cmd: kompose convert - kompose.version: 1.34.0 (cbf2835db) - labels: - io.kompose.service: nginx - name: nginx - namespace: reymota -spec: - replicas: 1 - selector: - matchLabels: - io.kompose.service: nginx - strategy: - type: Recreate - template: - metadata: - annotations: - kompose.cmd: kompose convert - kompose.version: 1.34.0 (cbf2835db) - labels: - io.kompose.service: nginx - spec: - containers: - - image: $REGISTRY/nginx-reymota-$ARQUITECTURA:$IMG_NGINX_VERSION - name: nginx - ports: - - containerPort: 80 - protocol: TCP - volumeMounts: - - mountPath: /app/reymota/staticfiles - name: static-volume - - mountPath: /app/reymota/mediafiles - name: reymota-media - imagePullSecrets: - - name: myregistrykey - restartPolicy: Always - volumes: - - name: static-volume - persistentVolumeClaim: - claimName: static-volume - - name: reymota-media - persistentVolumeClaim: - claimName: reymota-media diff --git a/K8S/nginx-service.yaml b/K8S/nginx-service.yaml deleted file mode 100644 index 1e8742f..0000000 --- a/K8S/nginx-service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - annotations: - kompose.cmd: kompose convert - kompose.version: 1.34.0 (cbf2835db) - labels: - io.kompose.service: nginx - name: nginx - namespace: reymota -spec: - type: NodePort - ports: - - name: "1337" - port: 1337 - nodePort: 30341 - targetPort: 80 - selector: - io.kompose.service: nginx - diff --git a/src/reymota/settings.py b/src/reymota/settings.py index 00fe163..34546d1 100644 --- a/src/reymota/settings.py +++ b/src/reymota/settings.py @@ -37,6 +37,8 @@ OPENSHIFT = os.environ["OPENSHIFT"] == 'True' ALLOWED_HOSTS = [".ocp-cluster.reymota.lab", "reymota.es", ".reymota.lab"] +CSRF_TRUSTED_ORIGINS = ["https://*.ocp-cluster.reymota.lab", "https://reymota.es", "http://reymota.rancher.reymota.lab"] + # Application definition INSTALLED_APPS = [ @@ -142,6 +144,7 @@ THOUSAND_SEPARATOR = '.' STATIC_URL = '/static/' STATIC_ROOT = BASE_DIR / "staticfiles" +STATICFILES_DIRS = [BASE_DIR / "static",] # Default primary key field type # https://docs.djangoproject.com/en/5.1/ref/settings/#default-auto-field @@ -157,8 +160,6 @@ AUTH_USER_MODEL = "reymotausers.ReyMotaUser" MEDIA_ROOT = BASE_DIR / "mediafiles" MEDIA_URL = '/media/' -CSRF_TRUSTED_ORIGINS = ["https://*.ocp-cluster.reymota.lab", "https://reymota.es", "http://reymota.rancher.reymota.lab"] - LOGGING = { 'version': 1, 'disable_existing_loggers': False,