From 347658eef7f4c0b7d120d39c07d07ac6dfcea281 Mon Sep 17 00:00:00 2001 From: Aurélien Bompard Date: Nov 22 2022 09:41:56 +0000 Subject: FMN: try to fix the sendria setup Signed-off-by: Aurélien Bompard --- diff --git a/roles/openshift-apps/fmn/templates/Dockerfile-sendria b/roles/openshift-apps/fmn/templates/Dockerfile-sendria index a10d28f..9dd3692 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 f9f3231..bbef061 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