mirror of
https://github.com/bokysan/docker-postfix.git
synced 2025-09-06 06:25:40 +08:00
Fix: Big logorotate ourselves for different platforms
This commit is contained in:
parent
4ec01297f6
commit
6da38c0d4e
7 changed files with 79 additions and 5 deletions
44
.github/actions/build-logrotate/action.yaml
vendored
Normal file
44
.github/actions/build-logrotate/action.yaml
vendored
Normal file
|
@ -0,0 +1,44 @@
|
|||
name: 'Build the logrotate'
|
||||
description: 'Build the latest version of logrotate'
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: blacklabelops/logrotate
|
||||
path: 'logrotate'
|
||||
ref: 'fdab0abc0b3f2917052e5d509e14e2b71d7fd9b3' # Latest commit we know that works
|
||||
|
||||
# Buildkit setup
|
||||
- uses: ./.github/actions/buildx-setup
|
||||
|
||||
# Docker hub login
|
||||
- uses: ./.github/actions/docker-hub-login
|
||||
with:
|
||||
DOCKER_ACCESS_TOKEN: '${{ inputs.DOCKER_ACCESS_TOKEN }}'
|
||||
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-logrotate-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-logrotate-
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: logrotate
|
||||
push: true
|
||||
tags: '${{ inputs.tags }}'
|
||||
platforms: "linux/arm/v6,linux/arm/v7,linux/amd64,linux/arm64,linux/ppc64le,linux/s390x"
|
||||
cache-from: type=local,src=/tmp/.buildx-cache/logrotate,mode=max,compression=estargz
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache-new/logrotate
|
||||
|
||||
- name: Move cache
|
||||
shell: bash
|
||||
run: |
|
||||
rm -rf /tmp/.buildx-cache
|
||||
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
|
15
.github/workflows/master.yml
vendored
15
.github/workflows/master.yml
vendored
|
@ -37,6 +37,21 @@ jobs:
|
|||
|
||||
- uses: ./.github/actions/helm-chart-tests
|
||||
|
||||
Build_Logrotate:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- Helm_chart_Tests
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: ./.github/actions/build-logrotate
|
||||
with:
|
||||
DOCKER_ACCESS_TOKEN: '${{ secrets.DOCKER_ACCESS_TOKEN }}'
|
||||
tags: |
|
||||
boky/logrotate:latest
|
||||
boky/logrotate:edge
|
||||
|
||||
Build_PostfixExporter:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
|
|
15
.github/workflows/tags.yml
vendored
15
.github/workflows/tags.yml
vendored
|
@ -37,6 +37,21 @@ jobs:
|
|||
|
||||
- uses: ./.github/actions/helm-chart-tests
|
||||
|
||||
Build_Logrotate:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- Helm_chart_Tests
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: ./.github/actions/build-logrotate
|
||||
with:
|
||||
DOCKER_ACCESS_TOKEN: '${{ secrets.DOCKER_ACCESS_TOKEN }}'
|
||||
tags: |
|
||||
boky/logrotate:latest
|
||||
boky/logrotate:edge
|
||||
|
||||
Build_PostfixExporter:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
|
|
|
@ -84,7 +84,7 @@ or
|
|||
|
||||
```shell script
|
||||
helm repo add bokysan https://bokysan.github.io/docker-postfix/
|
||||
helm upgrade --install --set persistence.enabled=false --set config.general.ALLOW_EMPTY_SENDER_DOMAINS=1 mail bokysan/mail
|
||||
helm upgrade --install --set persistence.enabled=false --set config.general.ALLOW_EMPTY_SENDER_DOMAINS=yes mail bokysan/mail
|
||||
```
|
||||
|
||||
You can also find this image at [ArtifactHub](https://artifacthub.io/packages/helm/docker-postfix/mail).
|
||||
|
|
|
@ -101,7 +101,7 @@ spec:
|
|||
- name: metrics-config
|
||||
mountPath: /etc/rsyslog.d-metrics/maillog.conf
|
||||
subPath: maillog.conf
|
||||
- name: {{ $fullName }}
|
||||
- name: {{ $fullName | quote }}
|
||||
mountPath: {{ regexFind "^/?.*/" .Values.metrics.maillog | quote }}
|
||||
readOnly: false
|
||||
subPath: logs
|
||||
|
@ -214,7 +214,7 @@ spec:
|
|||
{{- if .Values.metrics.enabled }}
|
||||
- name: metrics-config
|
||||
configMap:
|
||||
name: metrics-config
|
||||
name: {{ print $fullName "-metrics" | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.extraVolumes }}{{- toYaml .Values.extraVolumes | nindent 8 }}{{ end }}
|
||||
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
|
||||
|
|
|
@ -44,7 +44,7 @@ metrics:
|
|||
logrotate:
|
||||
enabled: true
|
||||
image:
|
||||
repository: "blacklabelops/logrotate"
|
||||
repository: "boky/logrotate"
|
||||
tag: "latest"
|
||||
logrotate.conf: |
|
||||
/var/log/mail.log {
|
||||
|
|
|
@ -426,7 +426,7 @@ postfix_setup_sender_domains() {
|
|||
# Since we are behind closed doors, let's just permit all relays.
|
||||
do_postconf -e "smtpd_relay_restrictions=permit"
|
||||
elif [ -z "$ALLOW_EMPTY_SENDER_DOMAINS" ]; then
|
||||
error "You need to specify ALLOWED_SENDER_DOMAINS otherwise Postfix will not run!"
|
||||
error "You need to specify ${emphasis}ALLOWED_SENDER_DOMAINS${reset} or ${emphasis}ALLOW_EMPTY_SENDER_DOMAINS${reset}, otherwise Postfix will not run! See ${emphasis}README.md${reset} for more info."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue