You've already forked docker-mailserver
mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-08 23:06:49 +02:00
Final Migration Step (#6)
* first migration steps * altered issue templates * altered README * removed .travis.yml * adjusting registry & repository, Dockerfile and compose.env * Close stale issues automatically * Integrated CI with Github Actions (#3) * feat: integrated ci with github actions * fix: use secrets for docker org and update image * docs: clarify why we use -t if no tty exists * fix: correct remaining references to old repo chore: prettier automatically updated markdown as well * fix: hardcode docker org * change testing image to just testing * ci: add armv7 as a supported platform * finished migration steps * corrected linting in build-push action * corrected linting in build-push action (2) * minor preps for PR * correcting push on pull request and minor details * adjusted workflows to adhere closer to @wernerfred's diagram * minor patches * adjusting Dockerfile's installation of base packages * adjusting schedule for stale issue action * reverting license text * improving CONTRIBUTING.md PR text * Update CONTRIBUTING.md * a bigger patch at the end * moved all scripts into one directory under target/scripts/ * moved the quota-warning.sh script into target/scripts/ and removed empty directory /target/dovecot/scripts * minor fixes here and there * adjusted workflows for use a fully qualified name (i.e. docker.io/...) * improved on the Dockerfile layer count * corrected local tests - now they (actually) work (fine)! * corrected start-mailserver.sh to make use of defaults consistently * removed very old, deprecated variables (actually only one) * various smaller improvements in the end * last commit before merging #6 * rearranging variables to use alphabetic order Co-authored-by: casperklein <casperklein@users.noreply.github.com> Co-authored-by: Nick Pappas <radicand@users.noreply.github.com> Co-authored-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
37
.github/CONTRIBUTING.md
vendored
37
.github/CONTRIBUTING.md
vendored
@ -1,37 +0,0 @@
|
||||
## Pull requests
|
||||
|
||||
We gladly accept pull requests to add documentation, fix bugs and, in some circumstances,
|
||||
add new features to Spree.
|
||||
|
||||
Here's a quick guide:
|
||||
|
||||
1. Fork the repo
|
||||
|
||||
2. Clone the fork to your local machine
|
||||
|
||||
3. Create new branch then make changes and add tests for your changes. Only
|
||||
refactoring and documentation changes require no new tests. If you are adding
|
||||
functionality or fixing a bug, we need tests!
|
||||
|
||||
4. Run the tests. `make build-no-cache generate-accounts run fixtures tests clean`
|
||||
|
||||
5. Push to your fork and submit a pull request. If the changes will apply cleanly
|
||||
to the master branch, you will only need to submit one pull request.
|
||||
|
||||
Don't do pull requests against `-stable` branches. Always target the master branch. Any bugfixes we'll backport to those branches.
|
||||
|
||||
At this point, you're waiting on us. We like to at least comment on, if not
|
||||
accept, pull requests within several days.
|
||||
We may suggest some changes or improvements or alternatives.
|
||||
|
||||
Some things that will increase the chance that your pull request is accepted.
|
||||
|
||||
Syntax:
|
||||
|
||||
* Two spaces, no tabs.
|
||||
* No trailing whitespace. Blank lines should not have any space.
|
||||
* Follow the conventions you see used in the source already.
|
||||
* Alphabetize the class methods to keep them organized
|
||||
|
||||
And in case we didn't emphasize it enough: we love tests!
|
||||
|
73
.github/ISSUE_TEMPLATE/bug_report.md
vendored
73
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@ -1,20 +1,16 @@
|
||||
---
|
||||
name: "\U0001F41E Bug report"
|
||||
about: Create a report about a reproducible bug
|
||||
title: ''
|
||||
labels: bug, needs triage
|
||||
assignees: ''
|
||||
|
||||
title: "[BUG]"
|
||||
labels: area/bug, meta/needs triage, priority/medium
|
||||
assignees: ""
|
||||
---
|
||||
<!--- Provide a general summary of the issue in the Title above -->
|
||||
|
||||
<!-- Thanks for the bug report! -->
|
||||
|
||||
|
||||
<!---
|
||||
## Possible answers to you issue
|
||||
Possible answers to your issue
|
||||
|
||||
* ClamAV keeps restarting:
|
||||
https://github.com/tomav/docker-mailserver#requirements
|
||||
https://github.com/docker-mailserver/docker-mailserver#requirements
|
||||
|
||||
* Email seen as spam:
|
||||
https://github.com/tomav/docker-mailserver/wiki/Configure-SPF
|
||||
@ -34,53 +30,52 @@ assignees: ''
|
||||
https://github.com/tomav/docker-mailserver/wiki
|
||||
|
||||
* Open issues
|
||||
https://github.com/tomav/docker-mailserver/issues
|
||||
https://github.com/docker-mailserver/docker-mailserver/issues
|
||||
-->
|
||||
|
||||
# Bug Report
|
||||
|
||||
## Context
|
||||
<!--- Provide a more detailed introduction to the issue itself -->
|
||||
<!--- How has this issue affected you? What were you trying to accomplish? -->
|
||||
|
||||
### *What* is affected by this bug?
|
||||
<!--- Provide a general summary of the bug -->
|
||||
|
||||
### What is affected by this bug?
|
||||
|
||||
### When does this occur?
|
||||
|
||||
### *When* does this occur?
|
||||
|
||||
|
||||
## *How* do we replicate the issue?
|
||||
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
|
||||
<!--- reproduce this issue include code to reproduce, if relevant -->
|
||||
### How do we replicate the issue?
|
||||
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
4.
|
||||
|
||||
## Actual Behavior
|
||||
<!--- Tell us what happens instead -->
|
||||
## Behavior
|
||||
|
||||
## Expected behavior (i.e. solution)
|
||||
<!--- Tell us what should happen -->
|
||||
### Actual Behavior
|
||||
|
||||
### Expected Behavior
|
||||
|
||||
## Your Environment
|
||||
|
||||
<!--- Include as many relevant details about the environment you experienced the issue in -->
|
||||
* Amount of RAM available:
|
||||
* Mailserver version used:
|
||||
* Docker version used:
|
||||
* Environment settings relevant to the config:
|
||||
* Any relevant stack traces ("Full trace" preferred):
|
||||
|
||||
<!---
|
||||
Please remember to format code using triple backticks (`) so that it is neatly formatted when the issue is posted.
|
||||
- version: `v`
|
||||
- available RAM: `GB`
|
||||
- Docker version: `v`
|
||||
|
||||
Spoilers are recommended for readability:
|
||||
<details>
|
||||
<summary>Click me to expand </summary>
|
||||
```sh
|
||||
echo "hello world"
|
||||
```
|
||||
</details>
|
||||
### Environment Variables
|
||||
|
||||
-->
|
||||
```CFG
|
||||
|
||||
```
|
||||
|
||||
### Relevant Stack Traces
|
||||
|
||||
<!-- Remember to format code using triple backticks (`) so that it is neatly formatted when the issue is posted. -->
|
||||
|
||||
```BASH
|
||||
# BEGIN
|
||||
|
||||
# END
|
||||
```
|
||||
|
40
.github/ISSUE_TEMPLATE/feature_request.md
vendored
40
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@ -1,42 +1,48 @@
|
||||
---
|
||||
name: "\U0001F389 Feature request"
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: feature request, needs triage
|
||||
title: '[FR]'
|
||||
labels: area/enhancement, kind/feature request, meta/needs triage, priority/low
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
## Is your feature request related to a problem?
|
||||
<!-- A clear and concise description of what the problem is. -->
|
||||
# Feature Request
|
||||
|
||||
## Context
|
||||
|
||||
|
||||
|
||||
## Describe the solution you'd like
|
||||
<!-- A clear and concise description of what you want to happen. -->
|
||||
### Is your Feature Request related to a Problem?
|
||||
|
||||
|
||||
|
||||
## Alternatives you've considered
|
||||
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
|
||||
### Describe the Solution you'd like
|
||||
|
||||
|
||||
|
||||
## Who will that feature be useful to?
|
||||
<!-- Is it solving a common problem, or is it an improvement that all current users will benefit from? -->
|
||||
### Are you going to implement it?
|
||||
|
||||
<!-- Select one, remove the other and do not shorten the sentence -->
|
||||
|
||||
Yes, because I know the probability of someone else doing it is low and I can learn from it.
|
||||
|
||||
## What have you done already?
|
||||
<!-- If you already built a prototype or a complete implementation of that feature, where is it possible to see it? -->
|
||||
No, and I understand that it is highly likely no one will implement it. Furthermore, I understand that this issue will likely become stale and will be closed.
|
||||
|
||||
|
||||
|
||||
## What are you going to contribute?
|
||||
<!-- Besides testing volunteering work made by other people, what are you going to contribute in order to help have that feature implemented, tested and documented? -->
|
||||
### What are you going to contribute??
|
||||
|
||||
|
||||
|
||||
## Additional context
|
||||
<!-- Add any other context about the feature request here. -->
|
||||
|
||||
### Alternatives you've considered
|
||||
|
||||
|
||||
|
||||
### Who will that Feature be useful to?
|
||||
|
||||
|
||||
|
||||
### What have you done already?
|
||||
|
||||
|
||||
|
26
.github/ISSUE_TEMPLATE/questions.md
vendored
26
.github/ISSUE_TEMPLATE/questions.md
vendored
@ -1,21 +1,27 @@
|
||||
---
|
||||
name: "❓ Question"
|
||||
name: "❓ Question / Other"
|
||||
about: Ask a question about docker-mailserver
|
||||
title: ''
|
||||
labels: question, needs triage
|
||||
labels: kind/question, priority/low, meta/help wanted, meta/needs triage
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
## Subject
|
||||
<!-- Select one, remove the others: -->
|
||||
# Subject
|
||||
|
||||
* [ ] I would like to contribute to the project (code, documentation, advocacy, integration, ...)
|
||||
* [ ] I would like some help for integrating this container with another service (rainloop, PostFWD, ...)
|
||||
* [ ] I would like to configure a not documented mail server use case
|
||||
* [ ] I would like some feedback concerning a use case
|
||||
* [ ] I have questions about TLS/SSL/STARTTLS/OpenSSL
|
||||
* [ ] Other
|
||||
<!-- Select one, remove the others -->
|
||||
|
||||
I would like to contribute to the project
|
||||
I would like to configure a not documented mail server use case
|
||||
I would like some feedback concerning a use case
|
||||
I have questions about TLS/SSL/STARTTLS/OpenSSL
|
||||
Other
|
||||
|
||||
## Description
|
||||
|
||||
<!-- When copy/pasting code, format the code with tripe backticks (`) ! -->
|
||||
|
||||
``` BASH
|
||||
# CODE GOES HERE
|
||||
|
||||
```
|
||||
|
22
.github/workflows/close_stale_issues.yml
vendored
Normal file
22
.github/workflows/close_stale_issues.yml
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
name: "Close Stale Issues"
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 1 * * *"
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v3
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
days-before-stale: 1 # TODO just for testing purposes, otherwise (20)
|
||||
days-before-close: 1 # TODO just for testing purposes, otherwise (10)
|
||||
stale-issue-label: "meta/stale"
|
||||
close-issue-label: "meta/frozen due to age or inactivity"
|
||||
stale-issue-message: >
|
||||
This issue has become stale because it has been open for 20 days without
|
||||
activity. Remove the label and comment or this issue will be closed in 10 days.
|
||||
close-issue-message: >
|
||||
This issue was closed due to inactivity.
|
116
.github/workflows/default_on_push.yml
vendored
Normal file
116
.github/workflows/default_on_push.yml
vendored
Normal file
@ -0,0 +1,116 @@
|
||||
name: "Build, Test & Deploy"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master", "stable" ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
imagetag: ${{ steps.prep.outputs.imagetag }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Prepare
|
||||
id: prep
|
||||
run: |
|
||||
DOCKER_IMAGE=docker.io/mailserver/testing
|
||||
TAGS="${DOCKER_IMAGE}:${GITHUB_SHA::8},${DOCKER_IMAGE}:latest"
|
||||
echo ::set-output name=tags::${TAGS}
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
id: buildx
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
- name: Build image locally
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
builder: ${{ steps.buildx.outputs.name }}
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
build-args: |
|
||||
VCS_REF=${{ github.sha }}
|
||||
VCS_VER=${{ github.ref }}
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
pull: true
|
||||
push: true
|
||||
tags: ${{ steps.prep.outputs.tags }}
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
|
||||
test:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: run test suite
|
||||
run: |
|
||||
NAME=docker.io/mailserver/testing:${GITHUB_SHA::8} bash -c 'make generate-accounts tests'
|
||||
env:
|
||||
CI: true
|
||||
|
||||
publish:
|
||||
needs: test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Prepare
|
||||
id: prep
|
||||
run: |
|
||||
DOCKER_IMAGE=docker.io/mailserver/docker-mailserver
|
||||
VERSION=latest
|
||||
[[ $GITHUB_REF == refs/tags/* ]] && VERSION=${GITHUB_REF#refs/tags/v}
|
||||
TAGS="${DOCKER_IMAGE}:${VERSION}"
|
||||
[[ $VERSION =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]] && TAGS="$TAGS,${DOCKER_IMAGE}:latest"
|
||||
echo ::set-output name=tags::${TAGS}
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
id: buildx
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
- name: Build image locally
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
builder: ${{ steps.buildx.outputs.name }}
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
build-args: |
|
||||
VCS_REF=${{ github.sha }}
|
||||
VCS_VER=${{ github.ref }}
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
pull: true
|
||||
push: true
|
||||
tags: ${{ steps.prep.outputs.tags }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
40
.github/workflows/linting.yml
vendored
Normal file
40
.github/workflows/linting.yml
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
name: "Lint"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ "*" ]
|
||||
push:
|
||||
branches: [ "master", "stable" ]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Hadolint
|
||||
run: |
|
||||
sudo curl -S -L https://github.com/hadolint/hadolint/releases/download/v${HADOLINT_VERSION}/hadolint-$(uname -s)-$(uname -m) -o /usr/local/bin/hadolint
|
||||
sudo chmod +rx /usr/local/bin/hadolint
|
||||
make hadolint
|
||||
env:
|
||||
HADOLINT_VERSION: 1.19.0
|
||||
- name: ShellCheck
|
||||
run: |
|
||||
sudo curl -S -L "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | tar -xJ
|
||||
sudo mv "shellcheck-v${SHELLCHECK_VERSION}/shellcheck" /usr/bin/
|
||||
sudo rm -rf "shellcheck-v${SHELLCHECK_VERSION}"
|
||||
make shellcheck
|
||||
env:
|
||||
SHELLCHECK_VERSION: 0.7.1
|
||||
- name: ECLint
|
||||
run: |
|
||||
sudo curl -S -L "https://github.com/editorconfig-checker/editorconfig-checker/releases/download/${ECLINT_VERSION}/ec-linux-amd64.tar.gz" | tar -xaz
|
||||
sudo mv bin/ec-linux-amd64 /usr/bin/eclint
|
||||
sudo rm -rf bin
|
||||
sudo chmod +x /usr/bin/eclint
|
||||
make eclint
|
||||
env:
|
||||
ECLINT_VERSION: 2.3.1
|
43
.github/workflows/scheduled_builds.yml
vendored
Normal file
43
.github/workflows/scheduled_builds.yml
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
name: "Build Stable on Schedule"
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * 5"
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: stable
|
||||
submodules: recursive
|
||||
- name: Prepare
|
||||
id: prep
|
||||
run: |
|
||||
TAGS="docker.io/mailserver/docker-mailserver:stable"
|
||||
echo ::set-output name=tags::${TAGS}
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
id: buildx
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
- name: Build image locally
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
builder: ${{ steps.buildx.outputs.name }}
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
build-args: |
|
||||
VCS_REF=${{ github.sha }}
|
||||
VCS_VER=${{ github.ref }}
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
pull: true
|
||||
push: true
|
||||
tags: ${{ steps.prep.outputs.tags }}
|
59
.github/workflows/test_merge_requests.yml
vendored
Normal file
59
.github/workflows/test_merge_requests.yml
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
name: "Test Merge Requests"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ "*" ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
imagetag: ${{ steps.prep.outputs.imagetag }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Prepare
|
||||
id: prep
|
||||
run: |
|
||||
DOCKER_IMAGE=docker.io/mailserver/testing
|
||||
TAGS="${DOCKER_IMAGE}:${GITHUB_SHA::8},${DOCKER_IMAGE}:latest"
|
||||
echo ::set-output name=tags::${TAGS}
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
id: buildx
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
- name: Build image locally
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
builder: ${{ steps.buildx.outputs.name }}
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
build-args: |
|
||||
VCS_REF=${{ github.sha }}
|
||||
VCS_VER=${{ github.ref }}
|
||||
platforms: linux/amd64
|
||||
pull: true
|
||||
push: true
|
||||
tags: ${{ steps.prep.outputs.tags }}
|
||||
|
||||
test:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: run test suite
|
||||
run: |
|
||||
NAME=docker.io/mailserver/testing:${GITHUB_SHA::8} bash -c 'make generate-accounts tests'
|
||||
env:
|
||||
CI: true
|
Reference in New Issue
Block a user