Adds mautic app.
This commit is contained in:
5
mautic/app.yaml
Normal file
5
mautic/app.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
name: mautic
|
||||
is: mautic
|
||||
description: Mautic is an open-source marketing automation platform for managing email campaigns, lead tracking, and multi-channel marketing.
|
||||
icon: https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/mautic.svg
|
||||
latest: "7"
|
||||
38
mautic/versions/7/README.md
Normal file
38
mautic/versions/7/README.md
Normal file
@@ -0,0 +1,38 @@
|
||||
# Mautic
|
||||
|
||||
Mautic is an open-source marketing automation platform for managing contacts, campaigns, emails, and landing pages.
|
||||
|
||||
## Dependencies
|
||||
|
||||
- **MySQL** - Database for storing contacts and campaign data
|
||||
- **SMTP** - For sending marketing emails and notifications
|
||||
|
||||
## Configuration
|
||||
|
||||
Key settings in `config.yaml`:
|
||||
|
||||
- **domain** - Where Mautic will be accessible
|
||||
- **storage** - Persistent volume size (default: `2Gi`)
|
||||
- **adminEmail** - Admin account email (defaults to your operator email)
|
||||
- **db.name** - Database name (default: `mautic`)
|
||||
- **smtp** - Email settings inherited from your Wild Cloud SMTP service
|
||||
|
||||
## First-Time Setup
|
||||
|
||||
1. Add and deploy the app:
|
||||
```bash
|
||||
wild app add mautic
|
||||
wild app deploy mautic
|
||||
```
|
||||
|
||||
2. Log in with:
|
||||
- **Email**: value of `adminEmail` in your config
|
||||
- **Password**: value of `adminPassword` in your `secrets.yaml`
|
||||
|
||||
3. Complete the onboarding wizard and configure your first email campaigns.
|
||||
|
||||
## Notes
|
||||
|
||||
- Mautic relies heavily on cron jobs for sending emails and processing campaigns — these are configured automatically in the deployment
|
||||
- The `siteUrl` config must match the actual URL the app is served at, or tracking pixels and links in emails will break
|
||||
- SMTP password is stored in `secrets.yaml` as `smtpPassword`
|
||||
65
mautic/versions/7/db-init-job.yaml
Normal file
65
mautic/versions/7/db-init-job.yaml
Normal file
@@ -0,0 +1,65 @@
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: mautic-db-init
|
||||
labels:
|
||||
component: db-init
|
||||
spec:
|
||||
backoffLimit: 10
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
component: db-init
|
||||
spec:
|
||||
restartPolicy: OnFailure
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: 999
|
||||
runAsGroup: 999
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
containers:
|
||||
- name: mysql-init
|
||||
image: mysql:9.1.0
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
readOnlyRootFilesystem: false
|
||||
env:
|
||||
- name: MYSQL_ROOT_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: mautic-secrets
|
||||
key: mysql.rootPassword
|
||||
- name: DB_HOSTNAME
|
||||
value: {{ .db.host }}
|
||||
- name: DB_PORT
|
||||
value: "{{ .db.port }}"
|
||||
- name: DB_DATABASE_NAME
|
||||
value: {{ .db.name }}
|
||||
- name: DB_USERNAME
|
||||
value: {{ .db.user }}
|
||||
- name: DB_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: mautic-secrets
|
||||
key: dbPassword
|
||||
command:
|
||||
- /bin/bash
|
||||
- -c
|
||||
- |
|
||||
set -e
|
||||
until mysql -h ${DB_HOSTNAME} -P ${DB_PORT} -u root -p${MYSQL_ROOT_PASSWORD} -e "SELECT 1" 2>/dev/null; do
|
||||
echo "Waiting for MySQL..."
|
||||
sleep 2
|
||||
done
|
||||
mysql -h ${DB_HOSTNAME} -P ${DB_PORT} -u root -p${MYSQL_ROOT_PASSWORD} <<EOF
|
||||
CREATE DATABASE IF NOT EXISTS ${DB_DATABASE_NAME} CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
CREATE USER IF NOT EXISTS '${DB_USERNAME}'@'%' IDENTIFIED BY '${DB_PASSWORD}';
|
||||
ALTER USER '${DB_USERNAME}'@'%' IDENTIFIED BY '${DB_PASSWORD}';
|
||||
GRANT ALL PRIVILEGES ON ${DB_DATABASE_NAME}.* TO '${DB_USERNAME}'@'%';
|
||||
FLUSH PRIVILEGES;
|
||||
EOF
|
||||
echo "Done"
|
||||
100
mautic/versions/7/deployment.yaml
Normal file
100
mautic/versions/7/deployment.yaml
Normal file
@@ -0,0 +1,100 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: mautic
|
||||
spec:
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
matchLabels:
|
||||
component: web
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
component: web
|
||||
spec:
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
runAsNonRoot: false
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
containers:
|
||||
- name: mautic
|
||||
image: mautic/mautic:7.1.2-apache
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 80
|
||||
protocol: TCP
|
||||
env:
|
||||
- name: MAUTIC_DB_HOST
|
||||
value: "{{ .db.host }}"
|
||||
- name: MAUTIC_DB_PORT
|
||||
value: "{{ .db.port }}"
|
||||
- name: MAUTIC_DB_DATABASE
|
||||
value: "{{ .db.name }}"
|
||||
- name: MAUTIC_DB_USER
|
||||
value: "{{ .db.user }}"
|
||||
- name: MAUTIC_DB_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: mautic-secrets
|
||||
key: dbPassword
|
||||
- name: MAUTIC_SITE_URL
|
||||
value: "{{ .siteUrl }}"
|
||||
- name: MAUTIC_ADMIN_EMAIL
|
||||
value: "{{ .adminEmail }}"
|
||||
- name: MAUTIC_ADMIN_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: mautic-secrets
|
||||
key: adminPassword
|
||||
- name: MAUTIC_SMTP_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: mautic-secrets
|
||||
key: smtp.password
|
||||
- name: MAUTIC_MAILER_DSN
|
||||
value: "smtp://{{ .smtp.user }}:$(MAUTIC_SMTP_PASSWORD)@{{ .smtp.host }}:{{ .smtp.port }}"
|
||||
resources:
|
||||
limits:
|
||||
cpu: "1"
|
||||
ephemeral-storage: 1Gi
|
||||
memory: 1Gi
|
||||
requests:
|
||||
cpu: 50m
|
||||
ephemeral-storage: 50Mi
|
||||
memory: 256Mi
|
||||
volumeMounts:
|
||||
- name: mautic-data
|
||||
mountPath: /var/www/html/docroot/media/files
|
||||
subPath: media-files
|
||||
- name: mautic-data
|
||||
mountPath: /var/www/html/docroot/media/images
|
||||
subPath: media-images
|
||||
- name: mautic-data
|
||||
mountPath: /var/www/html/var/logs
|
||||
subPath: logs
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 80
|
||||
initialDelaySeconds: 120
|
||||
timeoutSeconds: 10
|
||||
periodSeconds: 30
|
||||
failureThreshold: 6
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 80
|
||||
initialDelaySeconds: 60
|
||||
timeoutSeconds: 5
|
||||
periodSeconds: 10
|
||||
failureThreshold: 6
|
||||
securityContext:
|
||||
readOnlyRootFilesystem: false
|
||||
volumes:
|
||||
- name: mautic-data
|
||||
persistentVolumeClaim:
|
||||
claimName: mautic-data
|
||||
restartPolicy: Always
|
||||
25
mautic/versions/7/ingress.yaml
Normal file
25
mautic/versions/7/ingress.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: mautic
|
||||
annotations:
|
||||
external-dns.alpha.kubernetes.io/target: {{ .externalDnsDomain }}
|
||||
external-dns.alpha.kubernetes.io/cloudflare-proxied: "false"
|
||||
external-dns.alpha.kubernetes.io/ttl: "60"
|
||||
spec:
|
||||
ingressClassName: traefik
|
||||
rules:
|
||||
- host: {{ .domain }}
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: mautic
|
||||
port:
|
||||
number: 80
|
||||
tls:
|
||||
- hosts:
|
||||
- {{ .domain }}
|
||||
secretName: {{ .tlsSecretName }}
|
||||
16
mautic/versions/7/kustomization.yaml
Normal file
16
mautic/versions/7/kustomization.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: {{ .namespace }}
|
||||
labels:
|
||||
- includeSelectors: true
|
||||
pairs:
|
||||
app: mautic
|
||||
managedBy: kustomize
|
||||
partOf: wild-cloud
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- db-init-job.yaml
|
||||
- deployment.yaml
|
||||
- service.yaml
|
||||
- ingress.yaml
|
||||
- pvc.yaml
|
||||
28
mautic/versions/7/manifest.yaml
Normal file
28
mautic/versions/7/manifest.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
version: 7.1.2-2
|
||||
requires:
|
||||
- name: mysql
|
||||
- name: smtp
|
||||
defaultConfig:
|
||||
namespace: mautic
|
||||
externalDnsDomain: '{{ .cloud.domain }}'
|
||||
domain: mautic.{{ .cloud.domain }}
|
||||
tlsSecretName: wildcard-wild-cloud-tls
|
||||
storage: 2Gi
|
||||
siteUrl: https://mautic.{{ .cloud.domain }}
|
||||
adminEmail: '{{ .operator.email }}'
|
||||
db:
|
||||
host: '{{ .apps.mysql.host }}'
|
||||
port: "3306"
|
||||
name: mautic
|
||||
user: mautic
|
||||
smtp:
|
||||
host: '{{ .apps.smtp.host }}'
|
||||
port: '{{ .apps.smtp.port }}'
|
||||
user: '{{ .apps.smtp.user }}'
|
||||
from: '{{ .apps.smtp.from }}'
|
||||
defaultSecrets:
|
||||
- key: dbPassword
|
||||
- key: adminPassword
|
||||
requiredSecrets:
|
||||
- mysql.rootPassword
|
||||
- smtp.password
|
||||
4
mautic/versions/7/namespace.yaml
Normal file
4
mautic/versions/7/namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: {{ .namespace }}
|
||||
10
mautic/versions/7/pvc.yaml
Normal file
10
mautic/versions/7/pvc.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: mautic-data
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .storage }}
|
||||
12
mautic/versions/7/service.yaml
Normal file
12
mautic/versions/7/service.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: mautic
|
||||
spec:
|
||||
selector:
|
||||
component: web
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: 80
|
||||
protocol: TCP
|
||||
Reference in New Issue
Block a user