added config for mail-archiver

This commit is contained in:
2025-12-16 08:09:46 +00:00
parent 4810912797
commit 988f6f9d1a
7 changed files with 186 additions and 1 deletions
+45
View File
@@ -0,0 +1,45 @@
services:
mailarchive-app:
image: s1t5/mailarchiver:latest
restart: always
environment:
# Database Connection
- ConnectionStrings__DefaultConnection=Host=postgres;Database=MailArchiver;Username=mailuser;Password=masterkey;
# Authentication Settings
- Authentication__Username=admin
- Authentication__Password=secure123!
# TimeZone Settings
- TimeZone__DisplayTimeZoneId=Etc/UCT
ports:
- "5000:5000"
networks:
- postgres
volumes:
- ./data-protection-keys:/app/DataProtection-Keys
depends_on:
postgres:
condition: service_healthy
postgres:
image: postgres:17-alpine
restart: always
environment:
POSTGRES_DB: MailArchiver
POSTGRES_USER: mailuser
POSTGRES_PASSWORD: masterkey
volumes:
- ./postgres-data:/var/lib/postgresql/data
networks:
- postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -U mailuser -d MailArchiver"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
networks:
postgres:
@@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
io.kompose.service: mailarchive-app-claim0
name: mailarchive-app-claim0
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
@@ -0,0 +1,47 @@
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.34.0 (cbf2835db)
labels:
io.kompose.service: mailarchive-app
name: mailarchive-app
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: mailarchive-app
strategy:
type: Recreate
template:
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.34.0 (cbf2835db)
labels:
io.kompose.service: mailarchive-app
spec:
containers:
- env:
- name: Authentication__Password
value: secure123!
- name: Authentication__Username
value: admin
- name: ConnectionStrings__DefaultConnection
value: Host=postgres;Database=MailArchiver;Username=mailuser;Password=masterkey;
- name: TimeZone__DisplayTimeZoneId
value: Etc/UCT
image: s1t5/mailarchiver:latest
name: mailarchive-app
ports:
- containerPort: 5000
protocol: TCP
volumeMounts:
- mountPath: /app/DataProtection-Keys
name: mailarchive-app-claim0
restartPolicy: Always
volumes:
- name: mailarchive-app-claim0
persistentVolumeClaim:
claimName: mailarchive-app-claim0
@@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.34.0 (cbf2835db)
labels:
io.kompose.service: mailarchive-app
name: mailarchive-app
spec:
ports:
- name: "5000"
port: 5000
targetPort: 5000
selector:
io.kompose.service: mailarchive-app
@@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
io.kompose.service: postgres-claim0
name: postgres-claim0
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
+50
View File
@@ -0,0 +1,50 @@
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.34.0 (cbf2835db)
labels:
io.kompose.service: postgres
name: postgres
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: postgres
strategy:
type: Recreate
template:
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.34.0 (cbf2835db)
labels:
io.kompose.service: postgres
spec:
containers:
- env:
- name: POSTGRES_DB
value: MailArchiver
- name: POSTGRES_PASSWORD
value: masterkey
- name: POSTGRES_USER
value: mailuser
image: postgres:17-alpine
livenessProbe:
exec:
command:
- pg_isready -U mailuser -d MailArchiver
failureThreshold: 5
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 5
name: postgres
volumeMounts:
- mountPath: /var/lib/postgresql/data
name: postgres-claim0
restartPolicy: Always
volumes:
- name: postgres-claim0
persistentVolumeClaim:
claimName: postgres-claim0
+4 -1
View File
@@ -1,5 +1,8 @@
apiVersion: metallb.io/v1beta1 apiVersion: metallb.io/v1beta1
kind: L2Advertisement kind: L2Advertisement
metadata: metadata:
name: example name: l2adv-main
namespace: metallb-system namespace: metallb-system
spec:
ipAddressPools:
- main-pool