Adds akaunting app.

This commit is contained in:
2026-06-19 21:29:14 +00:00
parent 319ec01f0c
commit b95586e74b
10 changed files with 324 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
# Akaunting
Akaunting is an open-source accounting software for small businesses and freelancers.
## Dependencies
- **MySQL** - Database for storing accounting data
- **SMTP** - For sending invoices and notifications
## Configuration
Key settings in `config.yaml`:
- **domain** - Where Akaunting will be accessible
- **storage** - Persistent volume size (default: `2Gi`)
- **companyName** - Your company name (default: `My Company`)
- **companyEmail** - Company contact email (defaults to your operator email)
- **adminEmail** - Admin account email (defaults to your operator email)
- **locale** - Language/locale setting (default: `en-US`)
- **smtp** - Email settings inherited from your Wild Cloud SMTP service
## First-Time Setup
1. Add and deploy the app:
```bash
wild app add akaunting
wild app deploy akaunting
```
2. Log in with:
- **Email**: value of `adminEmail` in your config
- **Password**: value of `adminPassword` in your `secrets.yaml`
3. Set up your company details, chart of accounts, and start recording income and expenses.
## Notes
- Akaunting supports multiple companies in a single installation — additional companies can be added after login
- The `dbPrefix` config (`aka_`) prefixes all database table names to avoid conflicts
- Invoices, payments, and reports can be exported as PDF

View File

@@ -0,0 +1,64 @@
apiVersion: batch/v1
kind: Job
metadata:
name: akaunting-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: mysql-init
image: mysql:9.1.0
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: false
env:
- name: MYSQL_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: akaunting-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: akaunting-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"

View File

@@ -0,0 +1,114 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: akaunting
namespace: akaunting
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: akaunting
image: akaunting/akaunting:3.1.21
ports:
- name: http
containerPort: 80
protocol: TCP
env:
- name: AKAUNTING_SETUP
value: "true"
- name: APP_URL
value: https://{{ .domain }}
- name: LOCALE
value: {{ .locale }}
- 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: akaunting-secrets
key: dbPassword
- name: DB_PREFIX
value: {{ .dbPrefix }}
- name: COMPANY_NAME
value: "{{ .companyName }}"
- name: COMPANY_EMAIL
value: {{ .companyEmail }}
- name: ADMIN_EMAIL
value: {{ .adminEmail }}
- name: ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: akaunting-secrets
key: adminPassword
- name: MAIL_MAILER
value: smtp
- name: MAIL_HOST
value: {{ .smtp.host }}
- name: MAIL_PORT
value: "{{ .smtp.port }}"
- name: MAIL_USERNAME
value: {{ .smtp.user }}
- name: MAIL_PASSWORD
valueFrom:
secretKeyRef:
name: akaunting-secrets
key: smtpPassword
- name: MAIL_FROM_ADDRESS
value: {{ .smtp.from }}
resources:
limits:
cpu: "1"
ephemeral-storage: 1Gi
memory: 512Mi
requests:
cpu: 50m
ephemeral-storage: 50Mi
memory: 256Mi
volumeMounts:
- name: akaunting-data
mountPath: /var/www/html/storage
subPath: storage
- name: akaunting-data
mountPath: /var/www/html/public/uploads
subPath: uploads
livenessProbe:
tcpSocket:
port: 80
initialDelaySeconds: 120
timeoutSeconds: 10
periodSeconds: 30
failureThreshold: 6
readinessProbe:
tcpSocket:
port: 80
initialDelaySeconds: 60
timeoutSeconds: 5
periodSeconds: 15
failureThreshold: 3
securityContext:
readOnlyRootFilesystem: false
volumes:
- name: akaunting-data
persistentVolumeClaim:
claimName: akaunting-data
restartPolicy: Always

View File

@@ -0,0 +1,26 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: akaunting
namespace: akaunting
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: akaunting
port:
number: 80
tls:
- hosts:
- {{ .domain }}
secretName: {{ .tlsSecretName }}

View File

@@ -0,0 +1,16 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: akaunting
labels:
- includeSelectors: true
pairs:
app: akaunting
managedBy: kustomize
partOf: wild-cloud
resources:
- namespace.yaml
- db-init-job.yaml
- deployment.yaml
- service.yaml
- ingress.yaml
- pvc.yaml

View File

@@ -0,0 +1,31 @@
version: 3.1.21-1
requires:
- name: mysql
- name: smtp
defaultConfig:
namespace: akaunting
externalDnsDomain: '{{ .cloud.domain }}'
domain: akaunting.{{ .cloud.domain }}
tlsSecretName: wildcard-wild-cloud-tls
storage: 2Gi
locale: en-US
dbPrefix: aka_
companyName: My Company
companyEmail: '{{ .operator.email }}'
adminEmail: '{{ .operator.email }}'
db:
host: '{{ .apps.mysql.host }}'
port: "3306"
name: akaunting
user: akaunting
smtp:
host: '{{ .apps.smtp.host }}'
port: '{{ .apps.smtp.port }}'
from: '{{ .apps.smtp.from }}'
user: '{{ .apps.smtp.user }}'
defaultSecrets:
- key: dbPassword
- key: adminPassword
- key: smtpPassword
requiredSecrets:
- mysql.rootPassword

View File

@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: {{ .namespace }}

View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: akaunting-data
namespace: akaunting
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: {{ .storage }}

View File

@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: akaunting
namespace: akaunting
spec:
selector:
component: web
ports:
- name: http
port: 80
targetPort: 80
protocol: TCP