3 Commits

Author SHA1 Message Date
51a129812a fix(drone): push branch to github
All checks were successful
continuous-integration/drone/push Build is passing
2021-09-03 15:49:37 +02:00
1381fddb73 doc(README): add description of additional env vars
All checks were successful
continuous-integration/drone/push Build is passing
2021-09-03 15:45:49 +02:00
5a58b50ad8 fix: rollback to v3.2.4
All checks were successful
continuous-integration/drone/push Build is passing
2021-09-01 21:07:07 +02:00
8 changed files with 184 additions and 662 deletions

View File

@ -3,42 +3,35 @@ kind: pipeline
type: kubernetes type: kubernetes
name: linter name: linter
clone:
disable: true
platform: platform:
os: linux os: linux
arch: amd64
steps: steps:
- name: clone
image: git.cryptic.systems/volker.raschek/git:1.4.0
- name: markdown lint - name: markdown lint
commands: commands:
- markdownlint *.md - markdownlint *.md
image: git.cryptic.systems/volker.raschek/markdownlint:0.44.0 image: docker.io/tmknom/markdownlint:0.23.1
resources: resources:
limits: limits:
cpu: 150 cpu: 50
memory: 150M memory: 50M
- name: email-notification - name: email-notification
environment: environment:
SMTP_FROM_ADDRESS: PLUGIN_HOST:
from_secret: smtp_from_address
SMTP_FROM_NAME:
from_secret: smtp_from_name
SMTP_HOST:
from_secret: smtp_host from_secret: smtp_host
SMTP_USERNAME: PLUGIN_USERNAME:
from_secret: smtp_username from_secret: smtp_username
SMTP_PASSWORD: PLUGIN_PASSWORD:
from_secret: smtp_password from_secret: smtp_password
image: git.cryptic.systems/volker.raschek/drone-email:0.1.5 PLUGIN_FROM:
from_secret: smtp_mail_address
image: docker.io/drillster/drone-email:latest
resources: resources:
limits: limits:
cpu: 150 cpu: 50
memory: 150M memory: 25M
when: when:
status: status:
- changed - changed
@ -48,616 +41,178 @@ trigger:
event: event:
exclude: exclude:
- tag - tag
--- ---
kind: pipeline kind: pipeline
type: docker type: docker
name: dry-run-amd64 name: build-latest
clone:
disable: true
depends_on:
- linter
platform: platform:
os: linux os: linux
arch: amd64 arch: amd64
steps: steps:
- name: clone
image: git.cryptic.systems/volker.raschek/git:1.4.0
- name: build - name: build
image: harbor.cryptic.systems/docker/plugins/docker:20.18.8 image: docker.io/volkerraschek/build-image:latest
settings:
auto_tag: false
dockerfile: Dockerfile
dry_run: true
force_tag: true
no_cache: true
purge: true
mirror:
from_secret: docker_io_mirror
registry: git.cryptic.systems
repo: git.cryptic.systems/volker.raschek/postfixadmin
tags: latest-amd64
username:
from_secret: git_cryptic_systems_container_registry_user
password:
from_secret: git_cryptic_systems_container_registry_password
- name: email-notification
environment:
SMTP_FROM_ADDRESS:
from_secret: smtp_from_address
SMTP_FROM_NAME:
from_secret: smtp_from_name
SMTP_HOST:
from_secret: smtp_host
SMTP_USERNAME:
from_secret: smtp_username
SMTP_PASSWORD:
from_secret: smtp_password
image: git.cryptic.systems/volker.raschek/drone-email:0.1.5
when:
status:
- changed
- failure
trigger:
branch:
exclude:
- master
event:
- pull_request
- push
repo:
- volker.raschek/postfixadmin-docker
---
kind: pipeline
type: docker
name: dry-run-arm64-v8
clone:
disable: true
depends_on:
- linter
platform:
os: linux
arch: arm64
steps:
- name: clone
image: git.cryptic.systems/volker.raschek/git:1.4.0
- name: build
image: harbor.cryptic.systems/docker/plugins/docker:20.18.8
settings:
auto_tag: false
dockerfile: Dockerfile
dry_run: true
force_tag: true
no_cache: true
purge: true
mirror:
from_secret: docker_io_mirror
registry: git.cryptic.systems
repo: git.cryptic.systems/volker.raschek/postfixadmin
tags: latest-arm64-v8
username:
from_secret: git_cryptic_systems_container_registry_user
password:
from_secret: git_cryptic_systems_container_registry_password
- name: email-notification
environment:
SMTP_FROM_ADDRESS:
from_secret: smtp_from_address
SMTP_FROM_NAME:
from_secret: smtp_from_name
SMTP_HOST:
from_secret: smtp_host
SMTP_USERNAME:
from_secret: smtp_username
SMTP_PASSWORD:
from_secret: smtp_password
image: git.cryptic.systems/volker.raschek/drone-email:0.1.5
when:
status:
- changed
- failure
trigger:
branch:
exclude:
- master
event:
- pull_request
- push
repo:
- volker.raschek/postfixadmin-docker
---
kind: pipeline
type: docker
name: latest-amd64
clone:
disable: true
depends_on:
- linter
platform:
os: linux
arch: amd64
steps:
- name: clone
image: git.cryptic.systems/volker.raschek/git:1.4.0
- name: build
image: harbor.cryptic.systems/docker/plugins/docker:20.18.8
settings:
auto_tag: false
dockerfile: Dockerfile
force_tag: true
no_cache: true
purge: true
mirror:
from_secret: docker_io_mirror
registry: git.cryptic.systems
repo: git.cryptic.systems/volker.raschek/postfixadmin
tags: latest-amd64
username:
from_secret: git_cryptic_systems_container_registry_user
password:
from_secret: git_cryptic_systems_container_registry_password
- name: email-notification
environment:
SMTP_FROM_ADDRESS:
from_secret: smtp_from_address
SMTP_FROM_NAME:
from_secret: smtp_from_name
SMTP_HOST:
from_secret: smtp_host
SMTP_USERNAME:
from_secret: smtp_username
SMTP_PASSWORD:
from_secret: smtp_password
image: git.cryptic.systems/volker.raschek/drone-email:0.1.5
when:
status:
- changed
- failure
trigger:
branch:
- master
event:
- cron
- push
repo:
- volker.raschek/postfixadmin-docker
---
kind: pipeline
type: docker
name: latest-arm64-v8
clone:
disable: true
depends_on:
- linter
platform:
os: linux
arch: arm64
steps:
- name: clone
image: git.cryptic.systems/volker.raschek/git:1.4.0
- name: build
image: harbor.cryptic.systems/docker/plugins/docker:20.18.8
settings:
auto_tag: false
dockerfile: Dockerfile
force_tag: true
no_cache: true
purge: true
mirror:
from_secret: docker_io_mirror
registry: git.cryptic.systems
repo: git.cryptic.systems/volker.raschek/postfixadmin
tags: latest-arm64-v8
username:
from_secret: git_cryptic_systems_container_registry_user
password:
from_secret: git_cryptic_systems_container_registry_password
- name: email-notification
environment:
SMTP_FROM_ADDRESS:
from_secret: smtp_from_address
SMTP_FROM_NAME:
from_secret: smtp_from_name
SMTP_HOST:
from_secret: smtp_host
SMTP_USERNAME:
from_secret: smtp_username
SMTP_PASSWORD:
from_secret: smtp_password
image: git.cryptic.systems/volker.raschek/drone-email:0.1.5
when:
status:
- changed
- failure
trigger:
branch:
- master
event:
- cron
- push
repo:
- volker.raschek/postfixadmin-docker
---
kind: pipeline
type: kubernetes
name: latest-manifest
clone:
disable: true
depends_on:
- latest-amd64
- latest-arm64-v8
# docker.io/plugins/manifest only for amd64 architectures available
node_selector:
kubernetes.io/os: linux
kubernetes.io/arch: amd64
steps:
- name: clone
image: git.cryptic.systems/volker.raschek/git:1.4.0
- name: build-manifest
image: harbor.cryptic.systems/docker/plugins/manifest:1.4.0
settings:
auto_tag: false
ignore_missing: true
spec: manifest.tmpl
username:
from_secret: git_cryptic_systems_container_registry_user
password:
from_secret: git_cryptic_systems_container_registry_password
- name: email-notification
environment:
SMTP_FROM_ADDRESS:
from_secret: smtp_from_address
SMTP_FROM_NAME:
from_secret: smtp_from_name
SMTP_HOST:
from_secret: smtp_host
SMTP_USERNAME:
from_secret: smtp_username
SMTP_PASSWORD:
from_secret: smtp_password
image: git.cryptic.systems/volker.raschek/drone-email:0.1.5
resources:
limits:
cpu: 150
memory: 150M
when:
status:
- changed
- failure
trigger:
branch:
- master
event:
- cron
- push
repo:
- volker.raschek/postfixadmin-docker
---
kind: pipeline
type: kubernetes
name: latest-sync
clone:
disable: true
depends_on:
- latest-manifest
steps:
- name: clone
image: git.cryptic.systems/volker.raschek/git:1.4.0
- name: latest-sync
commands: commands:
- skopeo sync --all --src=docker --src-creds=$SRC_CRED_USERNAME:$SRC_CRED_PASSWORD --dest=docker --dest-creds=$DEST_CRED_USERNAME:$DEST_CRED_PASSWORD git.cryptic.systems/volker.raschek/postfixadmin docker.io/volkerraschek - make container-image/build
environment: volumes:
SRC_CRED_USERNAME: - name: docker_socket
from_secret: git_cryptic_systems_container_registry_user path: /var/run/docker.sock
SRC_CRED_PASSWORD:
from_secret: git_cryptic_systems_container_registry_password
DEST_CRED_USERNAME:
from_secret: container_image_registry_user
DEST_CRED_PASSWORD:
from_secret: container_image_registry_password
image: quay.io/skopeo/stable:v1.18.0
- name: email-notification - name: push
image: docker.io/volkerraschek/build-image:latest
commands:
- make container-image/push
environment: environment:
SMTP_FROM_ADDRESS: POSTFIXADMIN_IMAGE_REGISTRY_PASSWORD:
from_secret: smtp_from_address from_secret: container_image_registry_password
SMTP_FROM_NAME: volumes:
from_secret: smtp_from_name - name: docker_socket
SMTP_HOST: path: /var/run/docker.sock
when:
branch:
- master
repo:
- volker.raschek/postfixadmin-docker
- name: delete
image: docker.io/volkerraschek/build-image:latest
commands:
- make container-image/delete
volumes:
- name: docker_socket
path: /var/run/docker.sock
when:
branch:
- master
- name: notify
image: drillster/drone-email
environment:
PLUGIN_HOST:
from_secret: smtp_host from_secret: smtp_host
SMTP_USERNAME: PLUGIN_USERNAME:
from_secret: smtp_username from_secret: smtp_username
SMTP_PASSWORD: PLUGIN_PASSWORD:
from_secret: smtp_password from_secret: smtp_password
image: git.cryptic.systems/volker.raschek/drone-email:0.1.5 PLUGIN_FROM:
resources: from_secret: smtp_mail_address
limits:
cpu: 150
memory: 150M
when: when:
status: status:
- changed - changed
- failure - failure
volumes:
- name: docker_socket
host:
path: /var/run/docker.sock
trigger: trigger:
branch:
- master
event: event:
- cron exclude:
- push - tag
repo:
- volker.raschek/postfixadmin-docker
--- ---
kind: pipeline kind: pipeline
type: docker type: docker
name: tagged-amd64 name: build-tagged
clone:
disable: true
platform: platform:
os: linux os: linux
arch: amd64 arch: amd64
steps: steps:
- name: clone
image: git.cryptic.systems/volker.raschek/git:1.4.0
- name: build - name: build
image: harbor.cryptic.systems/docker/plugins/docker:20.18.8 image: docker.io/volkerraschek/build-image:latest
settings: commands:
auto_tag: true - make container-image/build POSTFIXADMIN_IMAGE_VERSION=${DRONE_TAG}
auto_tag_suffix: amd64 volumes:
dockerfile: Dockerfile - name: docker_socket
force_tag: true path: /var/run/docker.sock
no_cache: true
purge: true
mirror:
from_secret: docker_io_mirror
registry: git.cryptic.systems
repo: git.cryptic.systems/volker.raschek/postfixadmin
username:
from_secret: git_cryptic_systems_container_registry_user
password:
from_secret: git_cryptic_systems_container_registry_password
build_args:
- POSTFIXADMIN_VERSION=${DRONE_TAG}
- name: email-notification - name: push
image: docker.io/volkerraschek/build-image:latest
commands:
- make container-image/push POSTFIXADMIN_IMAGE_VERSION=${DRONE_TAG}
environment: environment:
SMTP_FROM_ADDRESS: POSTFIXADMIN_IMAGE_REGISTRY_PASSWORD:
from_secret: smtp_from_address from_secret: container_image_registry_password
SMTP_FROM_NAME: volumes:
from_secret: smtp_from_name - name: docker_socket
SMTP_HOST: path: /var/run/docker.sock
- name: delete
image: docker.io/volkerraschek/build-image:latest
commands:
- make container-image/delete POSTFIXADMIN_IMAGE_VERSION=${DRONE_TAG}
volumes:
- name: docker_socket
path: /var/run/docker.sock
- name: notify
image: drillster/drone-email
environment:
PLUGIN_HOST:
from_secret: smtp_host from_secret: smtp_host
SMTP_USERNAME: PLUGIN_USERNAME:
from_secret: smtp_username from_secret: smtp_username
SMTP_PASSWORD: PLUGIN_PASSWORD:
from_secret: smtp_password from_secret: smtp_password
image: git.cryptic.systems/volker.raschek/drone-email:0.1.5 PLUGIN_FROM:
from_secret: smtp_mail_address
when: when:
status: status:
- changed - changed
- failure - failure
volumes:
- name: docker_socket
host:
path: /var/run/docker.sock
trigger: trigger:
event: event:
- tag - tag
repo: repo:
- volker.raschek/postfixadmin-docker - volker.raschek/postfixadmin-docker
--- ---
kind: pipeline kind: pipeline
type: docker type: kubernetes
name: tagged-arm64-v8 name: sync
clone:
disable: true
platform: platform:
os: linux os: linux
arch: arm64 arch: amd64
steps: steps:
- name: clone - name: github
image: git.cryptic.systems/volker.raschek/git:1.4.0 image: docker.io/appleboy/drone-git-push:latest
- name: build
image: harbor.cryptic.systems/docker/plugins/docker:20.18.8
settings:
auto_tag: true
auto_tag_suffix: arm64-v8
dockerfile: Dockerfile
force_tag: true
no_cache: true
purge: true
mirror:
from_secret: docker_io_mirror
registry: git.cryptic.systems
repo: git.cryptic.systems/volker.raschek/postfixadmin
username:
from_secret: git_cryptic_systems_container_registry_user
password:
from_secret: git_cryptic_systems_container_registry_password
build_args:
- POSTFIXADMIN_VERSION=${DRONE_TAG}
- name: email-notification
environment:
SMTP_FROM_ADDRESS:
from_secret: smtp_from_address
SMTP_FROM_NAME:
from_secret: smtp_from_name
SMTP_HOST:
from_secret: smtp_host
SMTP_USERNAME:
from_secret: smtp_username
SMTP_PASSWORD:
from_secret: smtp_password
image: git.cryptic.systems/volker.raschek/drone-email:0.1.5
when:
status:
- changed
- failure
trigger:
event:
- tag
repo:
- volker.raschek/postfixadmin-docker
---
kind: pipeline
type: kubernetes
name: tagged-manifest
clone:
disable: true
depends_on:
- tagged-amd64
- tagged-arm64-v8
# docker.io/plugins/manifest only for amd64 architectures available
node_selector:
kubernetes.io/os: linux
kubernetes.io/arch: amd64
steps:
- name: clone
image: git.cryptic.systems/volker.raschek/git:1.4.0
- name: build-manifest
image: harbor.cryptic.systems/docker/plugins/manifest:1.4.0
settings:
auto_tag: true
ignore_missing: true
spec: manifest.tmpl
username:
from_secret: git_cryptic_systems_container_registry_user
password:
from_secret: git_cryptic_systems_container_registry_password
- name: email-notification
environment:
SMTP_FROM_ADDRESS:
from_secret: smtp_from_address
SMTP_FROM_NAME:
from_secret: smtp_from_name
SMTP_HOST:
from_secret: smtp_host
SMTP_USERNAME:
from_secret: smtp_username
SMTP_PASSWORD:
from_secret: smtp_password
image: git.cryptic.systems/volker.raschek/drone-email:0.1.5
resources: resources:
limits: limits:
cpu: 150 cpu: 50
memory: 150M memory: 25M
when: settings:
status: branch: v3.2.x
- changed remote: ssh://git@github.com/volker-raschek/postfixadmin-docker.git
- failure force: true
ssh_key:
trigger: from_secret: ssh_key
event:
- tag
repo:
- volker.raschek/postfixadmin-docker
---
kind: pipeline
type: kubernetes
name: tagged-sync
clone:
disable: true
depends_on:
- tagged-manifest
steps:
- name: clone
image: git.cryptic.systems/volker.raschek/git:1.4.0
- name: tagged-sync
commands:
- skopeo sync --all --src=docker --src-creds=$SRC_CRED_USERNAME:$SRC_CRED_PASSWORD --dest=docker --dest-creds=$DEST_CRED_USERNAME:$DEST_CRED_PASSWORD git.cryptic.systems/volker.raschek/postfixadmin docker.io/volkerraschek
environment:
SRC_CRED_USERNAME:
from_secret: git_cryptic_systems_container_registry_user
SRC_CRED_PASSWORD:
from_secret: git_cryptic_systems_container_registry_password
DEST_CRED_USERNAME:
from_secret: container_image_registry_user
DEST_CRED_PASSWORD:
from_secret: container_image_registry_password
image: quay.io/skopeo/stable:v1.18.0
- name: email-notification - name: email-notification
environment: environment:
SMTP_FROM_ADDRESS: PLUGIN_HOST:
from_secret: smtp_from_address
SMTP_FROM_NAME:
from_secret: smtp_from_name
SMTP_HOST:
from_secret: smtp_host from_secret: smtp_host
SMTP_USERNAME: PLUGIN_USERNAME:
from_secret: smtp_username from_secret: smtp_username
SMTP_PASSWORD: PLUGIN_PASSWORD:
from_secret: smtp_password from_secret: smtp_password
image: git.cryptic.systems/volker.raschek/drone-email:0.1.5 PLUGIN_FROM:
from_secret: smtp_mail_address
image: docker.io/drillster/drone-email:latest
resources: resources:
limits: limits:
cpu: 150 cpu: 50
memory: 150M memory: 25M
when: when:
status: status:
- changed - changed
@ -665,6 +220,6 @@ steps:
trigger: trigger:
event: event:
- tag - push
repo: repo:
- volker.raschek/postfixadmin-docker - volker.raschek/postfixadmin-docker

View File

@ -128,8 +128,8 @@ MD041:
# MD044/proper-names - Proper names should have the correct capitalization # MD044/proper-names - Proper names should have the correct capitalization
MD044: MD044:
# List of proper names # List of proper names
names: [] names:
# - PostfixAdmin - PostfixAdmin
# Include code blocks # Include code blocks
code_blocks: false code_blocks: false

View File

@ -1,7 +1,8 @@
FROM docker.io/library/php:7.4-apache FROM docker.io/library/php:7.4-apache
# POSTFIXADMIN VERSION # POSTFIXADMIN VERSION
ARG POSTFIXADMIN_VERSION ARG POSTFIXADMIN_VERSION \
POSTFIXADMIN_SHA512
# APACHE # APACHE
ENV APACHE_DOCUMENT_ROOT /var/www/html/public ENV APACHE_DOCUMENT_ROOT /var/www/html/public
@ -23,47 +24,45 @@ ENV POSTFIXADMIN_DATABASE_TYPE=sqlite \
# docker-entrypoint.sh dependencies # docker-entrypoint.sh dependencies
RUN set -eux; \ RUN set -eux; \
apt-get update; \ apt-get update; \
apt-get install --yes --no-install-recommends gosu apache2-utils; \ apt-get install --yes --no-install-recommends gosu; \
rm --recursive --force /var/lib/apt/lists/* rm --recursive --force /var/lib/apt/lists/*
# Install required PHP extensions # Install required PHP extensions
RUN set -ex; \ RUN set -ex; \
savedAptMark="$(apt-mark showmanual)"; \ savedAptMark="$(apt-mark showmanual)"; \
apt-get update; \ apt-get update; \
apt-get install --yes --no-install-recommends \ apt-get install --yes --no-install-recommends \
libc-client2007e-dev \ libc-client2007e-dev \
libkrb5-dev \ libkrb5-dev \
libpq-dev \ libpq-dev \
libsqlite3-dev; \ libsqlite3-dev; \
docker-php-ext-configure imap --with-imap-ssl --with-kerberos; \ docker-php-ext-configure imap --with-imap-ssl --with-kerberos; \
docker-php-ext-install -j "$(nproc)" \ docker-php-ext-install -j "$(nproc)" \
imap \ imap \
pdo_mysql \ pdo_mysql \
pdo_pgsql \ pdo_pgsql \
pdo_sqlite \ pdo_sqlite \
pgsql; \ pgsql; \
apt-mark auto '.*' > /dev/null; \ apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \ apt-mark manual $savedAptMark; \
ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \ ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
| awk '/=>/ { print $3 }' \ | awk '/=>/ { print $3 }' \
| sort -u \ | sort -u \
| xargs -r dpkg-query -S \ | xargs -r dpkg-query -S \
| cut -d: -f1 \ | cut -d: -f1 \
| sort -u \ | sort -u \
| xargs -rt apt-mark manual; \ | xargs -rt apt-mark manual; \
if [ ! -z ${POSTFIXADMIN_VERSION} ]; then \ apt-get purge --yes --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
curl --fail --silent --show-error --location "https://github.com/postfixadmin/postfixadmin/archive/postfixadmin-${POSTFIXADMIN_VERSION}.tar.gz" --output postfixadmin.tar.gz; \ rm --recursive --force /var/lib/apt/lists/*
tar --extract --file postfixadmin.tar.gz --directory /var/www/html --strip-components=1; \
rm postfixadmin.tar.gz; \
else \
apt-get install --yes git; \
git clone https://github.com/postfixadmin/postfixadmin.git /var/www/html; \
fi; \
apt-get purge --yes --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm --recursive --force /var/lib/apt/lists/*
RUN mkdir --parents /var/www/html/templates_c; \ RUN set -eu; \
chown --recursive www-data:www-data /var/www/html curl --fail --silent --show-error --location "https://github.com/postfixadmin/postfixadmin/archive/postfixadmin-${POSTFIXADMIN_VERSION}.tar.gz" --output postfixadmin.tar.gz ; \
echo "${POSTFIXADMIN_SHA512} *postfixadmin.tar.gz" | sha512sum -c -; \
tar --extract --file postfixadmin.tar.gz --directory /var/www/html --strip-components=1; \
rm postfixadmin.tar.gz; \
# Does not exist in tarball but is required
mkdir --parents /var/www/html/templates_c; \
chown --recursive www-data:www-data /var/www/html
COPY entrypoint.sh /usr/local/bin/ COPY entrypoint.sh /usr/local/bin/

View File

@ -1,50 +1,52 @@
# POSTFIXADMIN_VERSION POSTFIXADMIN_VERSION:=3.2.4
# Only required to install a specify version POSTFIXADMIN_SHA512:=2bd7ae05addbaf3c6c7eebea16ec1e21b2c67c8e6161446ed82a9553c26c04e19c1ec9ce248a9b9df504df56d309590259e6f04907b04b593548028b40e40d47
POSTFIXADMIN_VERSION?=3.3.15 # renovate: datasource=github-tags depName=postfixadmin/postfixadmin extractVersion='postfixadmin-(?<version>\\d+\\.\\d+\\.\\d+)$'
# PODMAN_BIN's and tools # CONTAINER_RUNTIME
PODMAN_BIN?=$(shell which podman) # The CONTAINER_RUNTIME variable will be used to specified the path to a
# container runtime. This is needed to start and run a container image.
CONTAINER_RUNTIME?=$(shell which docker)
# POSTFIXADMIN_IMAGE # POSTFIXADMIN_IMAGE_REGISTRY_NAME
POSTFIXADMIN_IMAGE_REGISTRY_HOST?=git.cryptic.systems # Defines the name of the new container to be built using several variables.
POSTFIXADMIN_IMAGE_REPOSITORY?=volker.raschek/postfixadmin POSTFIXADMIN_IMAGE_REGISTRY_NAME:=docker.io
POSTFIXADMIN_IMAGE_REGISTRY_USER:=volkerraschek
POSTFIXADMIN_IMAGE_NAMESPACE?=${POSTFIXADMIN_IMAGE_REGISTRY_USER}
POSTFIXADMIN_IMAGE_NAME:=postfixadmin
POSTFIXADMIN_IMAGE_VERSION?=latest POSTFIXADMIN_IMAGE_VERSION?=latest
POSTFIXADMIN_IMAGE_FULLY_QUALIFIED=${POSTFIXADMIN_IMAGE_REGISTRY_HOST}/${POSTFIXADMIN_IMAGE_REPOSITORY}:${POSTFIXADMIN_IMAGE_VERSION} POSTFIXADMIN_IMAGE_FULLY_QUALIFIED=${POSTFIXADMIN_IMAGE_REGISTRY_NAME}/${POSTFIXADMIN_IMAGE_NAMESPACE}/${POSTFIXADMIN_IMAGE_NAME}:${POSTFIXADMIN_IMAGE_VERSION}
POSTFIXADMIN_IMAGE_UNQUALIFIED=${POSTFIXADMIN_IMAGE_NAMESPACE}/${POSTFIXADMIN_IMAGE_NAME}:${POSTFIXADMIN_IMAGE_VERSION}
# BUILD CONTAINER IMAGE # BUILD CONTAINER IMAGE
# ============================================================================== # ==============================================================================
PHONY:=container-image/build PHONY:=container-image/build
container-image/build: container-image/build:
${PODMAN_BIN} build \ ${CONTAINER_RUNTIME} build \
--build-arg POSTFIXADMIN_VERSION=${POSTFIXADMIN_VERSION} \ --build-arg POSTFIXADMIN_VERSION=${POSTFIXADMIN_VERSION} \
--build-arg POSTFIXADMIN_SHA512=${POSTFIXADMIN_SHA512} \
--file Dockerfile \ --file Dockerfile \
--no-cache \ --no-cache \
--pull \ --pull \
--tag ${POSTFIXADMIN_IMAGE_FULLY_QUALIFIED} \ --tag ${POSTFIXADMIN_IMAGE_FULLY_QUALIFIED} \
--tag ${POSTFIXADMIN_IMAGE_UNQUALIFIED} \
. .
# DELETE CONTAINER IMAGE # DELETE CONTAINER IMAGE
# ============================================================================== # ==============================================================================
PHONY:=container-image/delete PHONY:=container-image/delete
container-image/delete: container-image/delete:
- ${PODMAN_BIN} image rm ${POSTFIXADMIN_IMAGE_FULLY_QUALIFIED} - ${CONTAINER_RUNTIME} image rm ${POSTFIXADMIN_IMAGE_FULLY_QUALIFIED} ${POSTFIXADMIN_IMAGE_UNQUALIFIED}
- ${CONTAINER_RUNTIME} image rm ${PHP_IMAGE_FULL}
# PUSH CONTAINER IMAGE # PUSH CONTAINER IMAGE
# ============================================================================== # ==============================================================================
PHONY+=container-image/push PHONY+=container-image/push
container-image/push: container-image/push:
echo ${POSTFIXADMIN_IMAGE_REGISTRY_PASSWORD} | ${PODMAN_BIN} login ${POSTFIXADMIN_IMAGE_REGISTRY_NAME} --username ${POSTFIXADMIN_IMAGE_REGISTRY_USER} --password-stdin echo ${POSTFIXADMIN_IMAGE_REGISTRY_PASSWORD} | ${CONTAINER_RUNTIME} login ${POSTFIXADMIN_IMAGE_REGISTRY_NAME} --username ${POSTFIXADMIN_IMAGE_REGISTRY_USER} --password-stdin
${PODMAN_BIN} push ${POSTFIXADMIN_IMAGE_FULLY_QUALIFIED} ${CONTAINER_RUNTIME} push ${POSTFIXADMIN_IMAGE_FULLY_QUALIFIED}
${PODMAN_BIN} logout ${POSTFIXADMIN_IMAGE_REGISTRY_HOST}
# PUSH CONTAINER IMAGE TO DOCKER
# ==============================================================================
PHONY+=container-image/push-to-docker-daemon
container-image/push-to-docker-daemon:
${PODMAN_BIN} push ${POSTFIXADMIN_IMAGE_FULLY_QUALIFIED} docker-daemon:${POSTFIXADMIN_IMAGE_FULLY_QUALIFIED}
# PHONY # PHONY
# ============================================================================== # ==============================================================================
# Declare the contents of the PHONY variable as phony. We keep that information # Declare the contents of the PHONY variable as phony. We keep that information
# in a variable so we can use it in if_changed. # in a variable so we can use it in if_changed.
.PHONY: ${PHONY} .PHONY: ${PHONY}

View File

@ -178,16 +178,15 @@ are documented
### POSTFIXADMIN_SETUP_PASSWORD ### POSTFIXADMIN_SETUP_PASSWORD
To login into the `setup.php` page is the setup password required. This can be To login into the `setup.php` page is the setup password required. This can be
defined via the variable `POSTFIXADMIN_SETUP_PASSWORD`. The password will be defined via the variable `POSTFIXADMIN_SETUP_PASSWORD`. The password will not be
hashed via bcrypt and used as value for the setting `$CONF['setup_password']` in configured in the `config.local.php` as plain text. It will be encrypted.
the config file `config.local.php`.
### POSTFIXADMIN_SMTP_CLIENT ### POSTFIXADMIN_SMTP_CLIENT
Hostname (FQDN) of the server hosting PostfixAdmin used in the `HELO` when Hostname (FQDN) of the server hosting PostfixAdmin used in the `HELO` when
sending emails from PostfixAdmin. The value of the environment will be sending emails from PostfixAdmin. The value of the environment will be
configured as the following config setting and is empty by default: configured as the following config setting: `$CONF['smtp_server']` and is empty
`$CONF['smtp_client']`. by default.
### POSTFIXADMIN_SMTP_SERVER ### POSTFIXADMIN_SMTP_SERVER

View File

@ -40,10 +40,6 @@ if [ "${POSTFIXADMIN_DATABASE_TYPE}" = 'sqlite' ]; then
fi fi
fi fi
# bycrypt POSTFIXADMIN_SETUP_PASSWORD
if [ ! -z ${POSTFIXADMIN_SETUP_PASSWORD+x} ]; then
POSTFIXADMIN_SETUP_PASSWORD=$(htpasswd -bnBC 10 "" "${POSTFIXADMIN_SETUP_PASSWORD}" | tr -d ':\n')
fi
# create config.local.pgp with vaules from env with POSTFIXADMIN_ prefix # create config.local.pgp with vaules from env with POSTFIXADMIN_ prefix
POSTFIXADMIN_ENV_VARS=($(env | sort | grep --perl-regexp '^POSTFIXADMIN_.*')) POSTFIXADMIN_ENV_VARS=($(env | sort | grep --perl-regexp '^POSTFIXADMIN_.*'))

View File

@ -1,20 +0,0 @@
image: git.cryptic.systems/volker.raschek/postfixadmin:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
{{#if build.tags}}
tags:
{{#each build.tags}}
- {{this}}
{{/each}}
- "latest"
{{/if}}
manifests:
-
image: git.cryptic.systems/volker.raschek/postfixadmin:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}-amd64
platform:
architecture: amd64
os: linux
-
image: git.cryptic.systems/volker.raschek/postfixadmin:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}-arm64-v8
platform:
architecture: arm64
os: linux
variant: v8

View File

@ -1,9 +0,0 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"local>volker.raschek/renovate-config:default#master",
"local>volker.raschek/renovate-config:container#master",
"local>volker.raschek/renovate-config:actions#master",
"local>volker.raschek/renovate-config:regexp#master"
]
}