Adds limesurvey app.
This commit is contained in:
5
limesurvey/app.yaml
Normal file
5
limesurvey/app.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
name: limesurvey
|
||||||
|
is: limesurvey
|
||||||
|
description: LimeSurvey is a free and open-source online survey tool that lets you create, publish, and analyze surveys without coding.
|
||||||
|
icon: https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/limesurvey.svg
|
||||||
|
latest: "6"
|
||||||
39
limesurvey/versions/6/README.md
Normal file
39
limesurvey/versions/6/README.md
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
# LimeSurvey
|
||||||
|
|
||||||
|
LimeSurvey is an open-source online survey tool for creating and publishing surveys, questionnaires, and polls.
|
||||||
|
|
||||||
|
## Dependencies
|
||||||
|
|
||||||
|
- **PostgreSQL** - Database for storing surveys and responses
|
||||||
|
- **SMTP** - For sending survey invitations and notifications
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
Key settings in `config.yaml`:
|
||||||
|
|
||||||
|
- **domain** - Where LimeSurvey will be accessible
|
||||||
|
- **storage** - Persistent volume size (default: `2Gi`)
|
||||||
|
- **adminUser** - Admin account username (default: `admin`)
|
||||||
|
- **adminEmail** - Admin account email (defaults to your operator email)
|
||||||
|
- **db.name** - Database name (default: `limesurvey`)
|
||||||
|
- **smtp** - Email settings inherited from your Wild Cloud SMTP service
|
||||||
|
|
||||||
|
## First-Time Setup
|
||||||
|
|
||||||
|
1. Add and deploy the app:
|
||||||
|
```bash
|
||||||
|
wild app add limesurvey
|
||||||
|
wild app deploy limesurvey
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Log in with:
|
||||||
|
- **Username**: value of `adminUser` in your config (default: `admin`)
|
||||||
|
- **Password**: value of `adminPassword` in your `secrets.yaml`
|
||||||
|
|
||||||
|
3. Create your first survey from the dashboard.
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
- Surveys can be published publicly or restricted to invitation-only participants
|
||||||
|
- The admin panel is at `/index.php/admin`
|
||||||
|
- Response data can be exported in CSV, Excel, SPSS, and other formats
|
||||||
63
limesurvey/versions/6/db-init-job.yaml
Normal file
63
limesurvey/versions/6/db-init-job.yaml
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
apiVersion: batch/v1
|
||||||
|
kind: Job
|
||||||
|
metadata:
|
||||||
|
name: limesurvey-db-init
|
||||||
|
labels:
|
||||||
|
component: db-init
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
component: db-init
|
||||||
|
spec:
|
||||||
|
restartPolicy: OnFailure
|
||||||
|
securityContext:
|
||||||
|
runAsNonRoot: true
|
||||||
|
runAsUser: 999
|
||||||
|
runAsGroup: 999
|
||||||
|
seccompProfile:
|
||||||
|
type: RuntimeDefault
|
||||||
|
containers:
|
||||||
|
- name: db-init
|
||||||
|
image: postgres:17
|
||||||
|
securityContext:
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
capabilities:
|
||||||
|
drop:
|
||||||
|
- ALL
|
||||||
|
readOnlyRootFilesystem: false
|
||||||
|
command: ["/bin/bash", "-c"]
|
||||||
|
args:
|
||||||
|
- |
|
||||||
|
PGPASSWORD=${POSTGRES_ADMIN_PASSWORD} psql -h ${DB_HOSTNAME} -U postgres <<EOF
|
||||||
|
DO \$\$
|
||||||
|
BEGIN
|
||||||
|
IF NOT EXISTS (SELECT FROM pg_catalog.pg_roles WHERE rolname = '${DB_USERNAME}') THEN
|
||||||
|
CREATE USER ${DB_USERNAME} WITH ENCRYPTED PASSWORD '${DB_PASSWORD}';
|
||||||
|
ELSE
|
||||||
|
ALTER USER ${DB_USERNAME} WITH ENCRYPTED PASSWORD '${DB_PASSWORD}';
|
||||||
|
END IF;
|
||||||
|
END
|
||||||
|
\$\$;
|
||||||
|
|
||||||
|
SELECT 'CREATE DATABASE ${DB_DATABASE_NAME}' WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = '${DB_DATABASE_NAME}')\gexec
|
||||||
|
ALTER DATABASE ${DB_DATABASE_NAME} OWNER TO ${DB_USERNAME};
|
||||||
|
GRANT ALL PRIVILEGES ON DATABASE ${DB_DATABASE_NAME} TO ${DB_USERNAME};
|
||||||
|
EOF
|
||||||
|
env:
|
||||||
|
- name: POSTGRES_ADMIN_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: postgres-secrets
|
||||||
|
key: password
|
||||||
|
- name: DB_HOSTNAME
|
||||||
|
value: "{{ .db.host }}"
|
||||||
|
- name: DB_DATABASE_NAME
|
||||||
|
value: "{{ .db.name }}"
|
||||||
|
- name: DB_USERNAME
|
||||||
|
value: "{{ .db.user }}"
|
||||||
|
- name: DB_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: limesurvey-secrets
|
||||||
|
key: dbPassword
|
||||||
103
limesurvey/versions/6/deployment.yaml
Normal file
103
limesurvey/versions/6/deployment.yaml
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: limesurvey
|
||||||
|
namespace: limesurvey
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
component: web
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
component: web
|
||||||
|
spec:
|
||||||
|
securityContext:
|
||||||
|
runAsNonRoot: true
|
||||||
|
runAsUser: 33
|
||||||
|
runAsGroup: 33
|
||||||
|
fsGroup: 33
|
||||||
|
seccompProfile:
|
||||||
|
type: RuntimeDefault
|
||||||
|
containers:
|
||||||
|
- name: limesurvey
|
||||||
|
image: martialblog/limesurvey:6.17.5-260527-apache
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 8080
|
||||||
|
protocol: TCP
|
||||||
|
env:
|
||||||
|
- name: DB_TYPE
|
||||||
|
value: pgsql
|
||||||
|
- name: DB_HOST
|
||||||
|
value: "{{ .db.host }}"
|
||||||
|
- name: DB_PORT
|
||||||
|
value: "{{ .db.port }}"
|
||||||
|
- name: DB_NAME
|
||||||
|
value: "{{ .db.name }}"
|
||||||
|
- name: DB_USERNAME
|
||||||
|
value: "{{ .db.user }}"
|
||||||
|
- name: DB_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: limesurvey-secrets
|
||||||
|
key: dbPassword
|
||||||
|
- name: ADMIN_USER
|
||||||
|
value: "{{ .adminUser }}"
|
||||||
|
- name: ADMIN_NAME
|
||||||
|
value: "{{ .adminUser }}"
|
||||||
|
- name: ADMIN_EMAIL
|
||||||
|
value: "{{ .adminEmail }}"
|
||||||
|
- name: ADMIN_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: limesurvey-secrets
|
||||||
|
key: adminPassword
|
||||||
|
- name: BASE_URL
|
||||||
|
value: "https://{{ .domain }}"
|
||||||
|
- name: URL_FORMAT
|
||||||
|
value: path
|
||||||
|
- name: SHOW_SCRIPT_NAME
|
||||||
|
value: "false"
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: "1"
|
||||||
|
ephemeral-storage: 1Gi
|
||||||
|
memory: 512Mi
|
||||||
|
requests:
|
||||||
|
cpu: 50m
|
||||||
|
ephemeral-storage: 50Mi
|
||||||
|
memory: 256Mi
|
||||||
|
volumeMounts:
|
||||||
|
- name: limesurvey-data
|
||||||
|
mountPath: /var/www/html/upload
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /index.php
|
||||||
|
port: 8080
|
||||||
|
initialDelaySeconds: 120
|
||||||
|
timeoutSeconds: 10
|
||||||
|
periodSeconds: 30
|
||||||
|
failureThreshold: 6
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /index.php
|
||||||
|
port: 8080
|
||||||
|
initialDelaySeconds: 60
|
||||||
|
timeoutSeconds: 5
|
||||||
|
periodSeconds: 15
|
||||||
|
failureThreshold: 3
|
||||||
|
securityContext:
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
capabilities:
|
||||||
|
drop:
|
||||||
|
- ALL
|
||||||
|
readOnlyRootFilesystem: false
|
||||||
|
volumes:
|
||||||
|
- name: limesurvey-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: limesurvey-data
|
||||||
|
restartPolicy: Always
|
||||||
26
limesurvey/versions/6/ingress.yaml
Normal file
26
limesurvey/versions/6/ingress.yaml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: limesurvey
|
||||||
|
namespace: limesurvey
|
||||||
|
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: limesurvey
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- {{ .domain }}
|
||||||
|
secretName: {{ .tlsSecretName }}
|
||||||
16
limesurvey/versions/6/kustomization.yaml
Normal file
16
limesurvey/versions/6/kustomization.yaml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
namespace: {{ .namespace }}
|
||||||
|
labels:
|
||||||
|
- includeSelectors: true
|
||||||
|
pairs:
|
||||||
|
app: limesurvey
|
||||||
|
managedBy: kustomize
|
||||||
|
partOf: wild-cloud
|
||||||
|
resources:
|
||||||
|
- namespace.yaml
|
||||||
|
- db-init-job.yaml
|
||||||
|
- deployment.yaml
|
||||||
|
- service.yaml
|
||||||
|
- ingress.yaml
|
||||||
|
- pvc.yaml
|
||||||
28
limesurvey/versions/6/manifest.yaml
Normal file
28
limesurvey/versions/6/manifest.yaml
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
version: 6.17.5-1
|
||||||
|
requires:
|
||||||
|
- name: postgres
|
||||||
|
- name: smtp
|
||||||
|
defaultConfig:
|
||||||
|
namespace: limesurvey
|
||||||
|
externalDnsDomain: "{{ .cloud.domain }}"
|
||||||
|
domain: limesurvey.{{ .cloud.domain }}
|
||||||
|
tlsSecretName: wildcard-wild-cloud-tls
|
||||||
|
storage: 2Gi
|
||||||
|
adminUser: admin
|
||||||
|
adminEmail: "{{ .operator.email }}"
|
||||||
|
db:
|
||||||
|
host: "{{ .apps.postgres.host }}"
|
||||||
|
port: "{{ .apps.postgres.port }}"
|
||||||
|
name: limesurvey
|
||||||
|
user: limesurvey
|
||||||
|
smtp:
|
||||||
|
host: "{{ .apps.smtp.host }}"
|
||||||
|
port: "{{ .apps.smtp.port }}"
|
||||||
|
from: "{{ .apps.smtp.from }}"
|
||||||
|
user: "{{ .apps.smtp.user }}"
|
||||||
|
defaultSecrets:
|
||||||
|
- key: adminPassword
|
||||||
|
- key: dbPassword
|
||||||
|
- key: smtpPassword
|
||||||
|
requiredSecrets:
|
||||||
|
- postgres.password
|
||||||
4
limesurvey/versions/6/namespace.yaml
Normal file
4
limesurvey/versions/6/namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: {{ .namespace }}
|
||||||
11
limesurvey/versions/6/pvc.yaml
Normal file
11
limesurvey/versions/6/pvc.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: limesurvey-data
|
||||||
|
namespace: limesurvey
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: {{ .storage }}
|
||||||
13
limesurvey/versions/6/service.yaml
Normal file
13
limesurvey/versions/6/service.yaml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: limesurvey
|
||||||
|
namespace: limesurvey
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
component: web
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 80
|
||||||
|
targetPort: 8080
|
||||||
|
protocol: TCP
|
||||||
Reference in New Issue
Block a user