1
0
mirror of https://github.com/Mailu/Mailu.git synced 2024-12-12 10:45:38 +02:00

Merge branch 'master' into fix-docs-image

This commit is contained in:
Erriez 2021-08-05 19:59:12 +02:00 committed by GitHub
commit 44e963ab1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 105 additions and 20 deletions

View File

@ -91,6 +91,20 @@ jobs:
shell: bash shell: bash
run: | run: |
echo "BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV echo "BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
- name: Derive MAILU_VERSION for branch testing
if: ${{ env.BRANCH == 'testing' }}
shell: bash
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
run: |
echo "MAILU_VERSION=pr-${COMMIT_MESSAGE//[!0-9]/}" >> $GITHUB_ENV
- name: Derive MAILU_VERSION for other branches than testing
if: ${{ env.BRANCH != 'testing' }}
shell: bash
env:
MAILU_BRANCH: ${{ env.BRANCH }}
run: |
echo "MAILU_VERSION=${{ env.MAILU_BRANCH }}" >> $GITHUB_ENV
- name: Create folder for storing images - name: Create folder for storing images
run: | run: |
sudo mkdir -p /images sudo mkdir -p /images
@ -124,6 +138,20 @@ jobs:
shell: bash shell: bash
run: | run: |
echo "BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV echo "BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
- name: Derive MAILU_VERSION for branch testing
if: ${{ env.BRANCH == 'testing' }}
shell: bash
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
run: |
echo "MAILU_VERSION=pr-${COMMIT_MESSAGE//[!0-9]/}" >> $GITHUB_ENV
- name: Derive MAILU_VERSION for other branches than testing
if: ${{ env.BRANCH != 'testing' }}
shell: bash
env:
MAILU_BRANCH: ${{ env.BRANCH }}
run: |
echo "MAILU_VERSION=${{ env.MAILU_BRANCH }}" >> $GITHUB_ENV
- name: Create folder for storing images - name: Create folder for storing images
run: | run: |
sudo mkdir -p /images sudo mkdir -p /images
@ -157,6 +185,20 @@ jobs:
shell: bash shell: bash
run: | run: |
echo "BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV echo "BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
- name: Derive MAILU_VERSION for branch testing
if: ${{ env.BRANCH == 'testing' }}
shell: bash
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
run: |
echo "MAILU_VERSION=pr-${COMMIT_MESSAGE//[!0-9]/}" >> $GITHUB_ENV
- name: Derive MAILU_VERSION for other branches than testing
if: ${{ env.BRANCH != 'testing' }}
shell: bash
env:
MAILU_BRANCH: ${{ env.BRANCH }}
run: |
echo "MAILU_VERSION=${{ env.MAILU_BRANCH }}" >> $GITHUB_ENV
- name: Create folder for storing images - name: Create folder for storing images
run: | run: |
sudo mkdir -p /images sudo mkdir -p /images
@ -190,6 +232,20 @@ jobs:
shell: bash shell: bash
run: | run: |
echo "BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV echo "BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
- name: Derive MAILU_VERSION for branch testing
if: ${{ env.BRANCH == 'testing' }}
shell: bash
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
run: |
echo "MAILU_VERSION=pr-${COMMIT_MESSAGE//[!0-9]/}" >> $GITHUB_ENV
- name: Derive MAILU_VERSION for other branches than testing
if: ${{ env.BRANCH != 'testing' }}
shell: bash
env:
MAILU_BRANCH: ${{ env.BRANCH }}
run: |
echo "MAILU_VERSION=${{ env.MAILU_BRANCH }}" >> $GITHUB_ENV
- name: Create folder for storing images - name: Create folder for storing images
run: | run: |
sudo mkdir -p /images sudo mkdir -p /images
@ -223,6 +279,20 @@ jobs:
shell: bash shell: bash
run: | run: |
echo "BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV echo "BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
- name: Derive MAILU_VERSION for branch testing
if: ${{ env.BRANCH == 'testing' }}
shell: bash
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
run: |
echo "MAILU_VERSION=pr-${COMMIT_MESSAGE//[!0-9]/}" >> $GITHUB_ENV
- name: Derive MAILU_VERSION for other branches than testing
if: ${{ env.BRANCH != 'testing' }}
shell: bash
env:
MAILU_BRANCH: ${{ env.BRANCH }}
run: |
echo "MAILU_VERSION=${{ env.MAILU_BRANCH }}" >> $GITHUB_ENV
- name: Create folder for storing images - name: Create folder for storing images
run: | run: |
sudo mkdir -p /images sudo mkdir -p /images
@ -256,6 +326,20 @@ jobs:
shell: bash shell: bash
run: | run: |
echo "BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV echo "BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
- name: Derive MAILU_VERSION for branch testing
if: ${{ env.BRANCH == 'testing' }}
shell: bash
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
run: |
echo "MAILU_VERSION=pr-${COMMIT_MESSAGE//[!0-9]/}" >> $GITHUB_ENV
- name: Derive MAILU_VERSION for other branches than testing
if: ${{ env.BRANCH != 'testing' }}
shell: bash
env:
MAILU_BRANCH: ${{ env.BRANCH }}
run: |
echo "MAILU_VERSION=${{ env.MAILU_BRANCH }}" >> $GITHUB_ENV
- name: Create folder for storing images - name: Create folder for storing images
run: | run: |
sudo mkdir -p /images sudo mkdir -p /images

View File

@ -1,8 +1,8 @@
# First stage to build assets # First stage to build assets
ARG DISTRO=alpine:3.12 ARG DISTRO=alpine:3.14
ARG ARCH="" ARG ARCH=""
FROM ${ARCH}node:8 as assets FROM ${ARCH}node:8 as assets
COPY --from=balenalib/rpi-alpine:3.10 /usr/bin/qemu-arm-static /usr/bin/qemu-arm-static COPY --from=balenalib/rpi-alpine:3.14 /usr/bin/qemu-arm-static /usr/bin/qemu-arm-static
COPY package.json ./ COPY package.json ./
RUN npm install RUN npm install
@ -24,9 +24,9 @@ RUN mkdir -p /app
WORKDIR /app WORKDIR /app
COPY requirements-prod.txt requirements.txt COPY requirements-prod.txt requirements.txt
RUN apk add --no-cache libressl curl postgresql-libs mariadb-connector-c \ RUN apk add --no-cache openssl curl postgresql-libs mariadb-connector-c \
&& apk add --no-cache --virtual build-dep \ && apk add --no-cache --virtual build-dep \
libressl-dev libffi-dev python3-dev build-base postgresql-dev mariadb-connector-c-dev cargo \ openssl-dev libffi-dev python3-dev build-base postgresql-dev mariadb-connector-c-dev cargo \
&& pip3 install -r requirements.txt \ && pip3 install -r requirements.txt \
&& apk del --no-cache build-dep && apk del --no-cache build-dep

View File

@ -1,4 +1,4 @@
ARG DISTRO=alpine:3.13 ARG DISTRO=alpine:3.14
FROM $DISTRO as builder FROM $DISTRO as builder
WORKDIR /tmp WORKDIR /tmp
RUN apk add git build-base automake autoconf libtool dovecot-dev xapian-core-dev icu-dev RUN apk add git build-base automake autoconf libtool dovecot-dev xapian-core-dev icu-dev

View File

@ -1,4 +1,4 @@
ARG DISTRO=alpine:3.12 ARG DISTRO=alpine:3.14
FROM $DISTRO FROM $DISTRO
# python3 shared with most images # python3 shared with most images
RUN apk add --no-cache \ RUN apk add --no-cache \

View File

@ -1,6 +1,6 @@
# This is an idle image to dynamically replace any component if disabled. # This is an idle image to dynamically replace any component if disabled.
ARG DISTRO=alpine:3.12 ARG DISTRO=alpine:3.14
FROM $DISTRO FROM $DISTRO
CMD sleep 1000000d CMD sleep 1000000d

View File

@ -1,4 +1,4 @@
ARG DISTRO=alpine:3.12 ARG DISTRO=alpine:3.14
FROM $DISTRO FROM $DISTRO
# python3 shared with most images # python3 shared with most images
RUN apk add --no-cache \ RUN apk add --no-cache \
@ -12,7 +12,7 @@ RUN pip3 install socrate==0.2.0
RUN pip3 install "podop>0.2.5" RUN pip3 install "podop>0.2.5"
# Image specific layers under this line # Image specific layers under this line
RUN apk add --no-cache postfix postfix-pcre cyrus-sasl-plain cyrus-sasl-login RUN apk add --no-cache postfix postfix-pcre cyrus-sasl-login
COPY conf /conf COPY conf /conf
COPY start.py /start.py COPY start.py /start.py

View File

@ -1,4 +1,4 @@
ARG DISTRO=alpine:3.12 ARG DISTRO=alpine:3.14
FROM $DISTRO FROM $DISTRO
# python3 shared with most images # python3 shared with most images
RUN apk add --no-cache \ RUN apk add --no-cache \

View File

@ -4,7 +4,7 @@
import os import os
extensions = ['sphinx.ext.imgmath', 'sphinx.ext.viewcode'] extensions = ['sphinx.ext.imgmath', 'sphinx.ext.viewcode', 'sphinx_rtd_theme']
templates_path = ['_templates'] templates_path = ['_templates']
source_suffix = '.rst' source_suffix = '.rst'
master_doc = 'index' master_doc = 'index'

View File

@ -2,3 +2,4 @@ recommonmark
Sphinx Sphinx
sphinx-autobuild sphinx-autobuild
sphinx-rtd-theme sphinx-rtd-theme
docutils==0.16

View File

@ -1,4 +1,4 @@
ARG DISTRO=alpine:3.12 ARG DISTRO=alpine:3.14
FROM $DISTRO FROM $DISTRO
# python3 shared with most images # python3 shared with most images
RUN apk add --no-cache \ RUN apk add --no-cache \

View File

@ -1,4 +1,4 @@
ARG DISTRO=alpine:3.12 ARG DISTRO=alpine:3.14
FROM $DISTRO FROM $DISTRO
# python3 shared with most images # python3 shared with most images

View File

@ -1,9 +1,8 @@
ARG DISTRO=alpine:3.12 ARG DISTRO=alpine:3.14
FROM $DISTRO FROM $DISTRO
# python3 shared with most images # python3 shared with most images
RUN apk add --no-cache \ RUN apk add --no-cache \
python3 py3-pip bash py3-multidict \ python3 py3-pip bash py3-multidict \
&& apk add --upgrade sudo \
&& pip3 install --upgrade pip && pip3 install --upgrade pip
# Shared layer between nginx, dovecot, postfix, postgresql, rspamd, unbound, rainloop, roundcube # Shared layer between nginx, dovecot, postfix, postgresql, rspamd, unbound, rainloop, roundcube

View File

@ -1,4 +1,4 @@
ARG DISTRO=alpine:3.12 ARG DISTRO=alpine:3.14
FROM $DISTRO FROM $DISTRO
# python3 shared with most images # python3 shared with most images

View File

@ -1,4 +1,4 @@
ARG DISTRO=alpine:3.12 ARG DISTRO=alpine:3.14
FROM $DISTRO FROM $DISTRO
# python3 shared with most images # python3 shared with most images
RUN apk add --no-cache \ RUN apk add --no-cache \

View File

@ -1,4 +1,4 @@
ARG DISTRO=alpine:3.10 ARG DISTRO=alpine:3.14
FROM $DISTRO FROM $DISTRO
RUN mkdir -p /app RUN mkdir -p /app

View File

@ -0,0 +1 @@
Remove cyrus-sasl-plain as it's not packaged by alpine anymore. SASL-login is still available and used when relaying.

View File

@ -3,7 +3,7 @@ ARG QEMU=other
# NOTE: only add file if building for arm # NOTE: only add file if building for arm
FROM ${ARCH}php:7.4-apache as build_arm FROM ${ARCH}php:7.4-apache as build_arm
ONBUILD COPY --from=balenalib/rpi-alpine:3.10 /usr/bin/qemu-arm-static /usr/bin/qemu-arm-static ONBUILD COPY --from=balenalib/rpi-alpine:3.14 /usr/bin/qemu-arm-static /usr/bin/qemu-arm-static
FROM ${ARCH}php:7.4-apache as build_other FROM ${ARCH}php:7.4-apache as build_other

View File

@ -2,7 +2,7 @@
ARG ARCH="" ARG ARCH=""
ARG QEMU=other ARG QEMU=other
FROM ${ARCH}php:7.4-apache as build_arm FROM ${ARCH}php:7.4-apache as build_arm
ONBUILD COPY --from=balenalib/rpi-alpine:3.10 /usr/bin/qemu-arm-static /usr/bin/qemu-arm-static ONBUILD COPY --from=balenalib/rpi-alpine:3.14 /usr/bin/qemu-arm-static /usr/bin/qemu-arm-static
FROM ${ARCH}php:7.4-apache as build_other FROM ${ARCH}php:7.4-apache as build_other