You've already forked postfixadmin-docker
Compare commits
48 Commits
3.2.4
...
67c006d66f
Author | SHA1 | Date | |
---|---|---|---|
67c006d66f
|
|||
664522903b
|
|||
e178930855 | |||
5ffaeaf154 | |||
48e7462fca | |||
986b7cf384 | |||
d7476f906e | |||
bd04e5fda8
|
|||
f7d5017a81
|
|||
da7534f2e1 | |||
eff75dc62a
|
|||
e652984bda
|
|||
9dc56df49d | |||
836fbcbce5
|
|||
1889fd0e92
|
|||
4bdc3f00a1
|
|||
a8f431e1e2
|
|||
676e4e9dc5 | |||
663759caf5 | |||
0955ae62ed | |||
6e4d59cd9f | |||
6bb3bb38de
|
|||
c5e351df7f
|
|||
2a3d60f01c | |||
f639dac5e2
|
|||
0edab8edaf | |||
06d2da8ec4
|
|||
ceb3a08682
|
|||
b3e042a8dc
|
|||
c170aaa085 | |||
a791674861 | |||
1c6d7bbbb3
|
|||
278bb991bf
|
|||
d885a22ae4
|
|||
56570f9fb8
|
|||
e29136e73a
|
|||
6edd838968 | |||
9a58c7c040
|
|||
3fc6dcd3fa
|
|||
4eb277bee4 | |||
ba879cd3f6 | |||
cf51ae8673
|
|||
b3d34f7ce7
|
|||
44b0814504
|
|||
6609d2528e
|
|||
8b7d475852
|
|||
89c2365406
|
|||
8161245db9
|
972
.drone.yml
972
.drone.yml
File diff suppressed because it is too large
Load Diff
@ -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
|
||||||
|
|
||||||
|
21
Dockerfile
21
Dockerfile
@ -1,8 +1,7 @@
|
|||||||
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
|
||||||
@ -24,7 +23,7 @@ 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; \
|
apt-get install --yes --no-install-recommends gosu apache2-utils; \
|
||||||
rm --recursive --force /var/lib/apt/lists/*
|
rm --recursive --force /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Install required PHP extensions
|
# Install required PHP extensions
|
||||||
@ -52,16 +51,18 @@ RUN set -ex; \
|
|||||||
| 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 \
|
||||||
|
curl --fail --silent --show-error --location "https://github.com/postfixadmin/postfixadmin/archive/postfixadmin-${POSTFIXADMIN_VERSION}.tar.gz" --output postfixadmin.tar.gz; \
|
||||||
|
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; \
|
apt-get purge --yes --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
|
||||||
rm --recursive --force /var/lib/apt/lists/*
|
rm --recursive --force /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN set -eu; \
|
RUN mkdir --parents /var/www/html/templates_c; \
|
||||||
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
|
chown --recursive www-data:www-data /var/www/html
|
||||||
|
|
||||||
COPY entrypoint.sh /usr/local/bin/
|
COPY entrypoint.sh /usr/local/bin/
|
||||||
|
8
Makefile
8
Makefile
@ -1,10 +1,11 @@
|
|||||||
POSTFIXADMIN_VERSION:=3.2.4
|
# POSTFIXADMIN_VERSION
|
||||||
POSTFIXADMIN_SHA512:=2bd7ae05addbaf3c6c7eebea16ec1e21b2c67c8e6161446ed82a9553c26c04e19c1ec9ce248a9b9df504df56d309590259e6f04907b04b593548028b40e40d47
|
# Only required to install a specifiy version
|
||||||
|
POSTFIXADMIN_VERSION?=3.3.13
|
||||||
|
|
||||||
# CONTAINER_RUNTIME
|
# CONTAINER_RUNTIME
|
||||||
# The CONTAINER_RUNTIME variable will be used to specified the path to a
|
# 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. This is needed to start and run a container image.
|
||||||
CONTAINER_RUNTIME?=$(shell which docker)
|
CONTAINER_RUNTIME?=$(shell which podman)
|
||||||
|
|
||||||
# POSTFIXADMIN_IMAGE_REGISTRY_NAME
|
# POSTFIXADMIN_IMAGE_REGISTRY_NAME
|
||||||
# Defines the name of the new container to be built using several variables.
|
# Defines the name of the new container to be built using several variables.
|
||||||
@ -23,7 +24,6 @@ PHONY:=container-image/build
|
|||||||
container-image/build:
|
container-image/build:
|
||||||
${CONTAINER_RUNTIME} 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 \
|
||||||
|
41
README.md
41
README.md
@ -24,7 +24,7 @@ prefix `POSTFIXADMIN_`. You can take an example
|
|||||||
from the upstream project.
|
from the upstream project.
|
||||||
|
|
||||||
| name | default |
|
| name | default |
|
||||||
| ----------------------------------- | --------------------------- |
|
| ----------------------------------- | ------------------------------------------- |
|
||||||
| `POSTFIXADMIN_ADMIN_EMAIL` | |
|
| `POSTFIXADMIN_ADMIN_EMAIL` | |
|
||||||
| `POSTFIXADMIN_ADMIN_SMTP_PASSWORD` | |
|
| `POSTFIXADMIN_ADMIN_SMTP_PASSWORD` | |
|
||||||
| `POSTFIXADMIN_ADMIN_NAME` | |
|
| `POSTFIXADMIN_ADMIN_NAME` | |
|
||||||
@ -43,6 +43,11 @@ from the upstream project.
|
|||||||
| `POSTFIXADMIN_ENCRYPT` | `md5crypt` |
|
| `POSTFIXADMIN_ENCRYPT` | `md5crypt` |
|
||||||
| `POSTFIXADMIN_SMTP_SERVER` | `localhost` |
|
| `POSTFIXADMIN_SMTP_SERVER` | `localhost` |
|
||||||
| `POSTFIXADMIN_SMTP_PORT` | `25` |
|
| `POSTFIXADMIN_SMTP_PORT` | `25` |
|
||||||
|
| `POSTFIXADMIN_SMTP_CLIENT` | |
|
||||||
|
| `POSTFIXADMIN_SHOW_FOOTER_TEXT` | `YES` |
|
||||||
|
| `POSTFIXADMIN_FOOTER_TEXT` | `Return to change-this-to-your.domain.tld` |
|
||||||
|
| `POSTFIXADMIN_FOOTER_LINK` | `http://change-this-to-your.domain.tld` |
|
||||||
|
| `POSTFIXADMIN_FETCHMAIL` | `YES` |
|
||||||
|
|
||||||
### POSTFIXADMIN_ADMIN_EMAIL
|
### POSTFIXADMIN_ADMIN_EMAIL
|
||||||
|
|
||||||
@ -173,5 +178,35 @@ 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 not be
|
defined via the variable `POSTFIXADMIN_SETUP_PASSWORD`. The password will be
|
||||||
configured in the `config.local.php` as plain text. It will be encrypted.
|
hashed via bcrypt and used as value for the setting `$CONF['setup_password']` in
|
||||||
|
the config file `config.local.php`.
|
||||||
|
|
||||||
|
### POSTFIXADMIN_SMTP_CLIENT
|
||||||
|
|
||||||
|
Hostname (FQDN) of the server hosting PostfixAdmin used in the `HELO` when
|
||||||
|
sending emails from PostfixAdmin. The value of the environment will be
|
||||||
|
configured as the following config setting and is empty by default:
|
||||||
|
`$CONF['smtp_client']`.
|
||||||
|
|
||||||
|
### POSTFIXADMIN_SMTP_SERVER
|
||||||
|
|
||||||
|
Hostname (FQDN) of your mail server. The default value is `localhost`. The value
|
||||||
|
of the environment will be configured as the following config setting:
|
||||||
|
`$CONF['smtp_server']`.
|
||||||
|
|
||||||
|
### POSTFIXADMIN_SMTP_PORT
|
||||||
|
|
||||||
|
Port of your mail server. The default value is `25`. The value of the
|
||||||
|
environment will be configured as the following config setting:
|
||||||
|
`$CONF['smtp_port']`.
|
||||||
|
|
||||||
|
### POSTFIXADMIN_SHOW_FOOTER_TEXT
|
||||||
|
|
||||||
|
Enable or disable via `YES` or `NO` the footer text displayed on all sites. Use
|
||||||
|
`POSTFIXADMIN_FOOTER_TEXT` and `POSTFIX_FOOTER_LINK` to customize the text.
|
||||||
|
|
||||||
|
### POSTFIXADMIN_FETCHMAIL
|
||||||
|
|
||||||
|
Enable or disable via `YES` or `NO` the fetchmail tab. It has nothing todo with
|
||||||
|
the fetchmail cron job.
|
||||||
|
@ -40,6 +40,10 @@ 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_.*'))
|
||||||
|
26
manifest.tmpl
Normal file
26
manifest.tmpl
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
image: volkerraschek/postfixadmin:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
|
||||||
|
{{#if build.tags}}
|
||||||
|
tags:
|
||||||
|
{{#each build.tags}}
|
||||||
|
- {{this}}
|
||||||
|
{{/each}}
|
||||||
|
- "latest"
|
||||||
|
{{/if}}
|
||||||
|
manifests:
|
||||||
|
-
|
||||||
|
image: volkerraschek/postfixadmin:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}-amd64
|
||||||
|
platform:
|
||||||
|
architecture: amd64
|
||||||
|
os: linux
|
||||||
|
-
|
||||||
|
image: volkerraschek/postfixadmin:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}-armv7
|
||||||
|
platform:
|
||||||
|
architecture: arm
|
||||||
|
os: linux
|
||||||
|
variant: v7
|
||||||
|
-
|
||||||
|
image: volkerraschek/postfixadmin:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}-arm64-v8
|
||||||
|
platform:
|
||||||
|
architecture: arm64
|
||||||
|
os: linux
|
||||||
|
variant: v8
|
48
renovate.json
Normal file
48
renovate.json
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
|
"assignees": [ "volker.raschek" ],
|
||||||
|
"automergeStrategy": "merge-commit",
|
||||||
|
"automergeType": "pr",
|
||||||
|
"labels": [ "renovate" ],
|
||||||
|
"packageRules": [
|
||||||
|
{
|
||||||
|
"addLabels": [ "renovate/droneci", "renovate/automerge" ],
|
||||||
|
"automerge": true,
|
||||||
|
"excludePackagePatterns": [ "plugins/docker" ],
|
||||||
|
"matchManagers": "droneci",
|
||||||
|
"matchUpdateTypes": [ "minor", "patch"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Automatically update patch version of used container images in docker files",
|
||||||
|
"addLabels": [ "renovate/container-image", "renovate/automerge" ],
|
||||||
|
"automerge": true,
|
||||||
|
"matchBaseBranches": [ "master" ],
|
||||||
|
"matchManagers": [ "dockerfile" ],
|
||||||
|
"matchUpdateTypes": [ "patch" ]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Trim leading postfixadmin- from git tag",
|
||||||
|
"addLabels": [ "renovate/postfixadmin" ],
|
||||||
|
"automerge": false,
|
||||||
|
"extractVersion": "^postfixadmin-(?<version>\\d+\\.\\d+\\.\\d+)$",
|
||||||
|
"matchPackageNames": [ "postfixadmin/postfixadmin" ],
|
||||||
|
"matchManagers": [ "regex" ]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rebaseLabel": "renovate/rebase",
|
||||||
|
"rebaseWhen": "behind-base-branch",
|
||||||
|
"regexManagers": [
|
||||||
|
{
|
||||||
|
"description": "Update postfixadmin git tag",
|
||||||
|
"fileMatch": [
|
||||||
|
"^Makefile$"
|
||||||
|
],
|
||||||
|
"matchStrings": [
|
||||||
|
"POSTFIXADMIN_VERSION\\?=(?<currentValue>.*?)\n"
|
||||||
|
],
|
||||||
|
"datasourceTemplate": "github-tags",
|
||||||
|
"depNameTemplate": "postfixadmin/postfixadmin",
|
||||||
|
"versioningTemplate": "regex:^(postfixadmin-)?(v)?(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)(\\s*)?$"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Reference in New Issue
Block a user