fixed deployment.

This commit is contained in:
Ruberoid aka tverpen 2025-07-19 12:32:19 +00:00
parent 343109a727
commit 640172d8ac

View File

@ -65,21 +65,6 @@ spec:
mountPath: /app/.secrets mountPath: /app/.secrets
- name: rw-files - name: rw-files
mountPath: /tmp/rw-files mountPath: /tmp/rw-files
initContainers:
- name: "update-mysql-init"
image: "busybox:latest"
command: [
"sh",
"-ce",
"cp /app/.secrets/WTelegram.session /tmp/rw-files/WTelegram.session &&
chmod a+w /tmp/rw-files/WTelegram.session &&
echo The TL Container is Running ; sleep 5 " ]
volumeMounts:
- name: secrets
mountPath: /app/.secrets
- name: rw-files
mountPath: /tmp/rw-files
livenessProbe: livenessProbe:
httpGet: httpGet:
path: /health path: /health
@ -87,20 +72,31 @@ spec:
initialDelaySeconds: 30 initialDelaySeconds: 30
periodSeconds: 30 periodSeconds: 30
timeoutSeconds: 5 timeoutSeconds: 5
readinessProbe: readinessProbe:
httpGet: httpGet:
path: /health path: /health
port: 8080 port: 8080
initialDelaySeconds: 5 initialDelaySeconds: 5
periodSeconds: 10 periodSeconds: 10
initContainers:
- name: "update-mysql-init"
image: "busybox:latest"
command:
- "sh"
- "-ce"
- "cp /app/.secrets/WTelegram.session /tmp/rw-files/WTelegram.session && chmod a+w /tmp/rw-files/WTelegram.session && echo The TL Container is Running ; sleep 5"
volumeMounts:
- name: secrets
mountPath: /app/.secrets
- name: rw-files
mountPath: /tmp/rw-files
volumes: volumes:
- name: secrets - name: secrets
secret: secret:
secretName: secretfiles secretName: secretfiles
- name: rw-files - name: rw-files
emptyDir: {} emptyDir: {}
--- ---
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@ -179,6 +175,7 @@ spec:
key: mariadb-root-password key: mariadb-root-password
- name: ConnectionStrings__TextMatcherContext - name: ConnectionStrings__TextMatcherContext
value: "server=$(mariadb_host);port=3306;database=$(mariadb_database);uid=$(mariadb_user);pwd=$(mariadb_password)" value: "server=$(mariadb_host);port=3306;database=$(mariadb_database);uid=$(mariadb_user);pwd=$(mariadb_password)"
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
@ -192,7 +189,8 @@ spec:
- protocol: TCP - protocol: TCP
port: 80 port: 80
targetPort: 8080 targetPort: 8080
type: NodePort # Change the service type to NodePort type: NodePort
--- ---
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@ -249,6 +247,7 @@ spec:
key: mariadb-root-password key: mariadb-root-password
- name: ConnectionStrings__UsersContext - name: ConnectionStrings__UsersContext
value: "server=$(mariadb_host);port=3306;database=$(mariadb_database);uid=$(mariadb_user);pwd=$(mariadb_password)" value: "server=$(mariadb_host);port=3306;database=$(mariadb_database);uid=$(mariadb_user);pwd=$(mariadb_password)"
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
@ -262,7 +261,7 @@ spec:
- protocol: TCP - protocol: TCP
port: 80 port: 80
targetPort: 8080 targetPort: 8080
type: NodePort # Change the service type to NodePort type: NodePort
--- ---
apiVersion: apps/v1 apiVersion: apps/v1