From 347658eef7f4c0b7d120d39c07d07ac6dfcea281 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Bompard?= Date: Tue, 22 Nov 2022 10:41:24 +0100 Subject: [PATCH] FMN: try to fix the sendria setup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Aurélien Bompard --- roles/openshift-apps/fmn/templates/Dockerfile-sendria | 7 ++++++- roles/openshift-apps/fmn/templates/deploymentconfig.yml | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/roles/openshift-apps/fmn/templates/Dockerfile-sendria b/roles/openshift-apps/fmn/templates/Dockerfile-sendria index a10d28f1a7..9dd3692408 100644 --- a/roles/openshift-apps/fmn/templates/Dockerfile-sendria +++ b/roles/openshift-apps/fmn/templates/Dockerfile-sendria @@ -2,4 +2,9 @@ # https://github.com/msztolcman/sendria/issues/17 FROM msztolcman/sendria:v2.2.2.0 -RUN chmod 0755 .local +RUN chmod 0755 .local .local/lib/python*/site-packages/ +RUN mkdir -p .config/sendria +RUN echo "[sendria]" > .config/sendria/config.toml +RUN mkdir data +ENV HOME=/home/sendria +ENTRYPOINT [ "sendria", "--foreground", "--db=./data/mails.sqlite", "--smtp-ip=0.0.0.0", "--http-ip=0.0.0.0" ] diff --git a/roles/openshift-apps/fmn/templates/deploymentconfig.yml b/roles/openshift-apps/fmn/templates/deploymentconfig.yml index f9f323194c..bbef061940 100644 --- a/roles/openshift-apps/fmn/templates/deploymentconfig.yml +++ b/roles/openshift-apps/fmn/templates/deploymentconfig.yml @@ -337,7 +337,9 @@ spec: ports: - containerPort: 1025 - containerPort: 1080 - resources: {} + volumeMounts: + - name: data + mountPath: /home/sendria/data readinessProbe: timeoutSeconds: 1 initialDelaySeconds: 30 @@ -350,6 +352,9 @@ spec: httpGet: path: / port: 1080 + volumes: + - name: data + emptyDir: {} triggers: - type: ConfigChange - type: ImageChange