Browse Source

Arreglo en crear repostajes para decimales y añado onlyoffice

main
Celestino Rey 1 year ago
parent
commit
9606c72933
23 changed files with 529 additions and 3 deletions
  1. +1
    -0
      Docker-DocumentServer
  2. +23
    -0
      HelmCharts/onlyoffice-chart/.helmignore
  3. +24
    -0
      HelmCharts/onlyoffice-chart/Chart.yaml
  4. +14
    -0
      HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-claim0-persistentvolumeclaim.yaml
  5. +14
    -0
      HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-claim1-persistentvolumeclaim.yaml
  6. +14
    -0
      HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-claim2-persistentvolumeclaim.yaml
  7. +14
    -0
      HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-claim3-persistentvolumeclaim.yaml
  8. +14
    -0
      HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-claim4-persistentvolumeclaim.yaml
  9. +77
    -0
      HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-deployment.yaml
  10. +26
    -0
      HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-service.yaml
  11. +48
    -0
      HelmCharts/onlyoffice-chart/templates/onlyoffice-postgresql-deployment.yaml
  12. +21
    -0
      HelmCharts/onlyoffice-chart/templates/onlyoffice-postgresql-service.yaml
  13. +33
    -0
      HelmCharts/onlyoffice-chart/templates/onlyoffice-rabbitmq-deployment.yaml
  14. +21
    -0
      HelmCharts/onlyoffice-chart/templates/onlyoffice-rabbitmq-service.yaml
  15. +14
    -0
      HelmCharts/onlyoffice-chart/templates/postgresql-data-persistentvolumeclaim.yaml
  16. +14
    -0
      HelmCharts/onlyoffice-chart/templates/pv-local-onlyoffice-cache.yaml
  17. +14
    -0
      HelmCharts/onlyoffice-chart/templates/pv-local-onlyoffice-data.yaml
  18. +14
    -0
      HelmCharts/onlyoffice-chart/templates/pv-local-onlyoffice-fonts.yaml
  19. +14
    -0
      HelmCharts/onlyoffice-chart/templates/pv-local-onlyoffice-log.yaml
  20. +14
    -0
      HelmCharts/onlyoffice-chart/templates/pv-local-onlyoffice-pgdata.yaml
  21. +14
    -0
      HelmCharts/onlyoffice-chart/templates/pv-local-onlyoffice-public.yaml
  22. +82
    -0
      HelmCharts/onlyoffice-chart/values.yaml
  23. +5
    -3
      Repostajes/gestionrepostajes/crearrepostaje.php

+ 1
- 0
Docker-DocumentServer

@ -0,0 +1 @@
Subproject commit 40efc5bea9d7c652f6e00a2a95e7027c1130f64b

+ 23
- 0
HelmCharts/onlyoffice-chart/.helmignore View File

@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/

+ 24
- 0
HelmCharts/onlyoffice-chart/Chart.yaml View File

@ -0,0 +1,24 @@
apiVersion: v2
name: onlyoffice-chart
description: A Helm chart for Kubernetes
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.16.0"

+ 14
- 0
HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-claim0-persistentvolumeclaim.yaml View File

@ -0,0 +1,14 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
labels:
io.kompose.service: onlyoffice-documentserver-claim0
name: onlyoffice-documentserver-claim0
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 15Gi
status: {}

+ 14
- 0
HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-claim1-persistentvolumeclaim.yaml View File

@ -0,0 +1,14 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
labels:
io.kompose.service: onlyoffice-documentserver-claim1
name: onlyoffice-documentserver-claim1
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
status: {}

+ 14
- 0
HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-claim2-persistentvolumeclaim.yaml View File

@ -0,0 +1,14 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
labels:
io.kompose.service: onlyoffice-documentserver-claim2
name: onlyoffice-documentserver-claim2
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 4Gi
status: {}

+ 14
- 0
HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-claim3-persistentvolumeclaim.yaml View File

@ -0,0 +1,14 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
labels:
io.kompose.service: onlyoffice-documentserver-claim3
name: onlyoffice-documentserver-claim3
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 3Gi
status: {}

+ 14
- 0
HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-claim4-persistentvolumeclaim.yaml View File

@ -0,0 +1,14 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
labels:
io.kompose.service: onlyoffice-documentserver-claim4
name: onlyoffice-documentserver-claim4
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
status: {}

+ 77
- 0
HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-deployment.yaml View File

@ -0,0 +1,77 @@
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.26.0 (40646f47)
creationTimestamp: null
labels:
io.kompose.service: onlyoffice-documentserver
name: onlyoffice-documentserver
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: onlyoffice-documentserver
strategy:
type: Recreate
template:
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.26.0 (40646f47)
creationTimestamp: null
labels:
io.kompose.service: onlyoffice-documentserver
spec:
containers:
- env:
- name: AMQP_URI
value: amqp://guest:guest@onlyoffice-rabbitmq
- name: DB_HOST
value: onlyoffice-postgresql
- name: DB_NAME
value: onlyoffice
- name: DB_PORT
value: "5432"
- name: DB_TYPE
value: postgres
- name: DB_USER
value: onlyoffice
image: onlyoffice/documentserver
name: onlyoffice-documentserver
ports:
- containerPort: 80
- containerPort: 443
resources: {}
stdin: true
volumeMounts:
- mountPath: /var/www/onlyoffice/Data
name: onlyoffice-documentserver-claim0
- mountPath: /var/log/onlyoffice
name: onlyoffice-documentserver-claim1
- mountPath: /var/lib/onlyoffice/documentserver/App_Data/cache/files
name: onlyoffice-documentserver-claim2
- mountPath: /var/www/onlyoffice/documentserver-example/public/files
name: onlyoffice-documentserver-claim3
- mountPath: /usr/share/fonts
name: onlyoffice-documentserver-claim4
restartPolicy: Always
terminationGracePeriodSeconds: 60
volumes:
- name: onlyoffice-documentserver-claim0
persistentVolumeClaim:
claimName: onlyoffice-documentserver-claim0
- name: onlyoffice-documentserver-claim1
persistentVolumeClaim:
claimName: onlyoffice-documentserver-claim1
- name: onlyoffice-documentserver-claim2
persistentVolumeClaim:
claimName: onlyoffice-documentserver-claim2
- name: onlyoffice-documentserver-claim3
persistentVolumeClaim:
claimName: onlyoffice-documentserver-claim3
- name: onlyoffice-documentserver-claim4
persistentVolumeClaim:
claimName: onlyoffice-documentserver-claim4
status: {}

+ 26
- 0
HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-service.yaml View File

@ -0,0 +1,26 @@
apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.26.0 (40646f47)
creationTimestamp: null
labels:
io.kompose.service: onlyoffice-documentserver
name: onlyoffice-documentserver
namespace: onlyoffice
spec:
type: NodePort
ports:
- name: "80"
port: 80
nodePort: 30590
targetPort: 80
- name: "443"
port: 443
nodePort: 30591
targetPort: 443
selector:
io.kompose.service: onlyoffice-documentserver
status:
loadBalancer: {}

+ 48
- 0
HelmCharts/onlyoffice-chart/templates/onlyoffice-postgresql-deployment.yaml View File

@ -0,0 +1,48 @@
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.26.0 (40646f47)
creationTimestamp: null
labels:
io.kompose.service: onlyoffice-postgresql
name: onlyoffice-postgresql
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: onlyoffice-postgresql
strategy:
type: Recreate
template:
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.26.0 (40646f47)
creationTimestamp: null
labels:
io.kompose.service: onlyoffice-postgresql
spec:
containers:
- env:
- name: POSTGRES_DB
value: onlyoffice
- name: POSTGRES_HOST_AUTH_METHOD
value: trust
- name: POSTGRES_USER
value: onlyoffice
image: postgres:12
name: onlyoffice-postgresql
ports:
- containerPort: 5432
resources: {}
volumeMounts:
- mountPath: /var/lib/postgresql
name: postgresql-data
restartPolicy: Always
volumes:
- name: postgresql-data
persistentVolumeClaim:
claimName: postgresql-data
status: {}

+ 21
- 0
HelmCharts/onlyoffice-chart/templates/onlyoffice-postgresql-service.yaml View File

@ -0,0 +1,21 @@
apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.26.0 (40646f47)
creationTimestamp: null
labels:
io.kompose.service: onlyoffice-postgresql
name: onlyoffice-postgresql
spec:
type: NodePort
ports:
- name: "5432"
port: 5432
nodePort: 30592
targetPort: 5432
selector:
io.kompose.service: onlyoffice-postgresql
status:
loadBalancer: {}

+ 33
- 0
HelmCharts/onlyoffice-chart/templates/onlyoffice-rabbitmq-deployment.yaml View File

@ -0,0 +1,33 @@
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.26.0 (40646f47)
creationTimestamp: null
labels:
io.kompose.service: onlyoffice-rabbitmq
name: onlyoffice-rabbitmq
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: onlyoffice-rabbitmq
strategy: {}
template:
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.26.0 (40646f47)
creationTimestamp: null
labels:
io.kompose.service: onlyoffice-rabbitmq
spec:
containers:
- image: rabbitmq
name: onlyoffice-rabbitmq
ports:
- containerPort: 5672
resources: {}
restartPolicy: Always
status: {}

+ 21
- 0
HelmCharts/onlyoffice-chart/templates/onlyoffice-rabbitmq-service.yaml View File

@ -0,0 +1,21 @@
apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.26.0 (40646f47)
creationTimestamp: null
labels:
io.kompose.service: onlyoffice-rabbitmq
name: onlyoffice-rabbitmq
spec:
type: NodePort
ports:
- name: "5672"
port: 5672
nodePort: 30593
targetPort: 5672
selector:
io.kompose.service: onlyoffice-rabbitmq
status:
loadBalancer: {}

+ 14
- 0
HelmCharts/onlyoffice-chart/templates/postgresql-data-persistentvolumeclaim.yaml View File

@ -0,0 +1,14 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
labels:
io.kompose.service: postgresql-data
name: postgresql-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 25Gi
status: {}

+ 14
- 0
HelmCharts/onlyoffice-chart/templates/pv-local-onlyoffice-cache.yaml View File

@ -0,0 +1,14 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: onlyoffice-cache-folder
labels:
app: onlyoffice
spec:
capacity:
storage: 4Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/mnt/Externo/onlyoffice/Cache"

+ 14
- 0
HelmCharts/onlyoffice-chart/templates/pv-local-onlyoffice-data.yaml View File

@ -0,0 +1,14 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: onlyoffice-data-folder
labels:
app: onlyoffice
spec:
capacity:
storage: 15Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/mnt/Externo/onlyoffice/Data"

+ 14
- 0
HelmCharts/onlyoffice-chart/templates/pv-local-onlyoffice-fonts.yaml View File

@ -0,0 +1,14 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: onlyoffice-fonts-folder
labels:
app: onlyoffice
spec:
capacity:
storage: 10Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/mnt/Externo/onlyoffice/Fonts"

+ 14
- 0
HelmCharts/onlyoffice-chart/templates/pv-local-onlyoffice-log.yaml View File

@ -0,0 +1,14 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: onlyoffice-log-folder
labels:
app: onlyoffice
spec:
capacity:
storage: 5Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/mnt/Externo/onlyoffice/Log"

+ 14
- 0
HelmCharts/onlyoffice-chart/templates/pv-local-onlyoffice-pgdata.yaml View File

@ -0,0 +1,14 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: onlyoffice-pgdata-folder
labels:
app: onlyoffice
spec:
capacity:
storage: 25Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/mnt/Externo/onlyoffice/PG_Data"

+ 14
- 0
HelmCharts/onlyoffice-chart/templates/pv-local-onlyoffice-public.yaml View File

@ -0,0 +1,14 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: onlyoffice-public-folder
labels:
app: onlyoffice
spec:
capacity:
storage: 3Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/mnt/Externo/onlyoffice/public"

+ 82
- 0
HelmCharts/onlyoffice-chart/values.yaml View File

@ -0,0 +1,82 @@
# Default values for onlyoffice-chart.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
repository: nginx
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""
podAnnotations: {}
podSecurityContext: {}
# fsGroup: 2000
securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000
service:
type: ClusterIP
port: 80
ingress:
enabled: false
className: ""
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: chart-example.local
paths:
- path: /
pathType: ImplementationSpecific
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
nodeSelector: {}
tolerations: []
affinity: {}

+ 5
- 3
Repostajes/gestionrepostajes/crearrepostaje.php View File

@ -45,9 +45,11 @@ if (isset($_POST['submit'])) {
// Calcula el precio por litro // Calcula el precio por litro
//$total = floatval($_POST['importe']); //$total = floatval($_POST['importe']);
$total=floatval(str_replace(',', '.', str_replace('.', '', $_POST['importe'])));
//$total=floatval(str_replace(',', '.', str_replace('.', '', $_POST['importe'])));
$total = floatval($_POST['importe']);
$cantidad = floatval(str_replace(',', '.', str_replace('.', '', $_POST['litros'])));
//$cantidad = floatval(str_replace(',', '.', str_replace('.', '', $_POST['litros'])));
$cantidad = floatval($_POST['litros']);
if(empty($_POST['dtoing'])) { if(empty($_POST['dtoing'])) {
$dto = 0; $dto = 0;
@ -95,7 +97,7 @@ if (isset($_POST['submit'])) {
* Logs * Logs
*/ */
$log_msg='CREA REPOSTAJE-> Descuento: '.$dto.'. Total con descuento: '.$totalcondto.'. Total introducido: '.$_POST['importe'].'. Kilometros anteriores: '.$kmsanteriores.'. Kilometros recorridos: '.$kmsrecorridos;
$log_msg='CREA REPOSTAJE-> Litros: '.$cantidad.' Descuento: '.$dto.'. Total con descuento: '.$totalcondto.'. Total introducido: '.$_POST['importe'].'. Kilometros anteriores: '.$kmsanteriores.'. Kilometros recorridos: '.$kmsrecorridos;
escribe_log($log_msg); escribe_log($log_msg);


Loading…
Cancel
Save