Skip to content

Commit 214c0e8

Browse files
committed
added spread topology, wait for install in mautic-console image
1 parent 15ab6c2 commit 214c0e8

File tree

5 files changed

+29
-4
lines changed

5 files changed

+29
-4
lines changed

Taskfile.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ tasks:
66
- docker buildx create --name multiarch --bootstrap --use
77
docker:build:
88
env:
9-
VERSION: 5.1.22
9+
VERSION: 5.1.24
1010
cmds:
1111
- docker build --platform linux/amd64,linux/arm64 --builder=multiarch -t docker.io/tanjim/mautic:install-$VERSION --target=install --push .
1212
- docker build --platform linux/amd64,linux/arm64 --builder=multiarch -t docker.io/tanjim/mautic:console-$VERSION --target=console --push .

charts/mautic/templates/deployment.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,15 @@ spec:
4242
{{- toYaml .Values.mautic.web.resources | nindent 12 }}
4343
volumeMounts:
4444
{{- include "mautic.volumeMounts" . | nindent 12 }}
45+
{{- with .Values.mautic.web.topologySpreadConstraints }}
46+
topologySpreadConstraints:
47+
{{- range . }}
48+
- {{ . | toYaml | indent 10 | trim }}
49+
labelSelector:
50+
matchLabels:
51+
{{- include "mautic.selectorLabels" $ | nindent 14 }}
52+
{{- end }}
53+
{{- end }}
4554
volumes:
4655
{{- include "mautic.volumes" . | nindent 8 }}
4756
---

charts/mautic/values.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ mautic:
55
image:
66
repository: docker.io/tanjim/mautic
77
pullPolicy: IfNotPresent
8-
tag: "5.1.22"
8+
tag: "5.1.24"
99

1010
# existingConfigMap: ""
1111
# ignore the following values if existingConfigMap is set
@@ -65,7 +65,11 @@ mautic:
6565
<<: *probe
6666
failureThreshold: 30
6767
periodSeconds: 10
68-
68+
topologySpreadConstraints:
69+
- maxSkew: 1
70+
topologyKey: "kubernetes.io/hostname"
71+
whenUnsatisfiable: ScheduleAnyway
72+
6973
install:
7074
# optional, if SITE_URL is not set in configMap
7175
siteUrl: "https://localhost:8080"

dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,5 +100,7 @@ FROM core as console
100100
ENV PHP_INI_VALUE_MAX_EXECUTION_TIME=600 \
101101
PHP_INI_VALUE_MEMORY_LIMIT=-1
102102

103-
ENTRYPOINT ["php", "bin/console", "--no-interaction", "--no-ansi"]
103+
COPY ./entrypoints/console.sh /entrypoint.sh
104+
105+
ENTRYPOINT [ "./entrypoint.sh" ]
104106
CMD ["--help"]

entrypoints/console.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
echo "Waiting for Mautic to be installed..."
6+
until php bin/is_installed.php; do
7+
sleep 5
8+
done
9+
10+
php bin/console --no-interaction --no-ansi "$@"

0 commit comments

Comments
 (0)