From abc7bb6fa709d478c9ef3f8a33bddaca940210fd Mon Sep 17 00:00:00 2001 From: Hrdayesh Patel Date: Mon, 24 Sep 2018 13:53:07 -0400 Subject: [PATCH 1/5] Initial commit of repo --- .travis.yml | 41 ++++++++++++++++++++++++++++ CHANGELOG.md | 10 +++++++ Dockerfile | 23 ++++++++++++++++ README.md | 13 ++++++++- bin/postfix_init.sh | 42 +++++++++++++++++++++++++++++ bin/travis-ci/check_tag.sh | 48 +++++++++++++++++++++++++++++++++ bin/travis-ci/docker_build.sh | 22 +++++++++++++++ bin/travis-ci/docker_publish.sh | 24 +++++++++++++++++ bin/travis-ci/docker_upgrade.sh | 30 +++++++++++++++++++++ supervisor.conf | 13 +++++++++ 10 files changed, 265 insertions(+), 1 deletion(-) create mode 100644 .travis.yml create mode 100644 CHANGELOG.md create mode 100644 Dockerfile create mode 100644 bin/postfix_init.sh create mode 100644 bin/travis-ci/check_tag.sh create mode 100644 bin/travis-ci/docker_build.sh create mode 100644 bin/travis-ci/docker_publish.sh create mode 100644 bin/travis-ci/docker_upgrade.sh create mode 100644 supervisor.conf diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..bcb530c --- /dev/null +++ b/.travis.yml @@ -0,0 +1,41 @@ +# Define build stages +stages: + - Tests + - SDLC Tasks + - Build and Publish + +jobs: + include: + - stage: Tests + name: Shellcheck + env: + - SHELLCHECK_OPTS="-e SC1008 -e SC2154" + language: bash + script: + - shellcheck $(find . -type f -name '*.sh') + - name: Dockerfile linter + language: minimal + script: + - docker run --rm -v $PWD:/root/ projectatomic/dockerfile-lint dockerfile_lint -f ./deb-builder/Dockerfile + - docker run --rm -v $PWD:/root/ projectatomic/dockerfile-lint dockerfile_lint -f ./nginx-php-moodle/Dockerfile + - stage: "SDLC Tasks" + name: Tag & iteration update + sudo: required + language: bash + script: + - bash bin/travis-ci/check_tag.sh + - stage: Build and Publish + name: Docker image + env: + - secure: f2d/XXnpYhkG543Uu/MByFlMDAYyYCI/SckSralR0exI10D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CY9p7AqGiWzDQupKzzgsZ/qH6P9TdOQi5CsMwCLBdltpkfW4GSOC7CrIjrEuixDjN4DOSccjZRcDdiA5XURsQWJKooHT/+Mr28uwAJQQ99ffx9rUobzndZjv1+am/80pxh2OmGP3LGZg3J9LvrJluQIZxLmHalpWiM5TSjW9zpOyWLdiNLZixf9/aWAqvjUPz5Wo4/hqzHEsEUFcVeuxTY9yVhn9YBGdGmzkGpLAt6zmCPE+fM3UT/zGP4= + - secure: kSHmkAhMMo6HWl3RwT3Fdw+wawPZaY6ecHL4E1AwAXuZPAUXJ38k2lppxF9ciWpJpkSJAE7+le8A7qJJuLKecQ/y4X7LCE6BYiCi7hyKEq4E/nBD8WnZyCC7lvAn2RoBQtDWP3PbzkNljBC96Zs+1lLKtbQ+5XLHMGyr9BXIAlUo/hUHBc9ZDWiyw/vzUCYZOOM2p24mtLw0dG6+cpT2/u4n1m4C+qpwPPqWfW6/4rEaybcCf+PWahCHDGGmEAGYLaPQFNDdYmPGwgdCHth+ofOnVxoRl/phQFDOk8BuEoxXgblpj0idDh61juX43foZVU7xdJi6sKkMDP3Glvxr4eSKvXpwqEXl8Jf4kfw/qF28huxXdINzOft8Owl4OTX8qyxlBfPWVR+e/mvjHp+HHsjHBTAw3LXIO8oFZkmIqENEL63lq9YGAPavsjcClsLE2vhMe18zl6jdYuE9fYO4uVBXlCCK6rFVApLp7o0ltkuVSCjSv1A0J9VARJmQYZBHXkeIY2eGA24O9lKhQf4l1CJWe9ThpKm5DAGZny9rnST/xobbdX2kbgq0l3olGRQaCxUFsl6RrdTc0K3DMJ6UqumoYyGaf2qQeaNZI4stChpF9D2vloudhga0x1wQjvm4+y7o/5qicrrfN5Lr05kU1Bg6mDXPddy9/9a6yf6/Uno= + language: minimal + sudo: required + services: + - docker + script: + - bash bin/travis-ci/docker_upgrade.sh + - bash bin/travis-ci/docker_build.sh + # Publish if we're on or pushing to master + - if [[ ${TRAVIS_BRANCH} = "master" ]]; then bash bin/travis-ci/docker_publish.sh; fi diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..821da62 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,10 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +## [v0.1.1] - 2018-08-13 +### Added +- Project `CHANGELOG.md`, `README.md`, and `LICENSE` +- Initial commit of Docker, build, and configuration diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..70794d8 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +FROM ubuntu:bionic + +LABEL name="postfix" +LABEL version="latest" + +# Disable frontend dialogs +ENV DEBIAN_FRONTEND noninteractive + +RUN apt-get update \ + && apt-get install --yes \ + postfix \ + rsyslog \ + supervisor \ + && apt-get --purge -y autoremove \ + && apt-get --yes clean \ + && rm -rf /etc/apt/sources.list.d/temp.list /var/lib/apt/lists/* + +COPY ./supervisor.conf /etc/supervisor/conf.d/postfix.conf + +COPY ./bin/postfix_init.sh /postfix_init.sh +RUN chmod u+x /postfix_init.sh + +CMD ["/usr/bin/python", "/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"] diff --git a/README.md b/README.md index 01e1d0c..99a21c8 100644 --- a/README.md +++ b/README.md @@ -1 +1,12 @@ -# postfix-docker \ No newline at end of file +# postfix-docker + +This repo deploys `postfix` inside a Docker container. + +## Configuration + +See `./bin/postfix_init.sh` for configuration parameters that are available via environment variables. + +## Features + +* Supervisor to manaage `postfix`, `rsyslog`, and log output to `stdout` +* Logging with `rsyslog` diff --git a/bin/postfix_init.sh b/bin/postfix_init.sh new file mode 100644 index 0000000..2fe6f22 --- /dev/null +++ b/bin/postfix_init.sh @@ -0,0 +1,42 @@ +#!/bin/bash +# +# Copyright (c) 2018 SD Elements Inc. +# +# All Rights Reserved. +# +# NOTICE: All information contained herein is, and remains +# the property of SD Elements Incorporated and its suppliers, +# if any. The intellectual and technical concepts contained +# herein are proprietary to SD Elements Incorporated +# and its suppliers and may be covered by U.S., Canadian and other Patents, +# patents in process, and are protected by trade secret or copyright law. +# Dissemination of this information or reproduction of this material +# is strictly forbidden unless prior written permission is obtained +# from SD Elements Inc.. +# Version + +set -eo pipefail + +echo "Configuring postfix with any environment variables that are set" +if [[ -n "${POSTFIX_MYNETWORKS}" ]]; then + echo "Setting custom 'mynetworks' to '${POSTFIX_MYNETWORKS}'" + postconf mynetworks="${POSTFIX_MYNETWORKS}" +else + echo "Revert 'mynetworks' to default" + postconf mynetworks="127.0.0.1/32 172.0.0.0/8" +fi + +if [[ -n "${POSTFIX_RELAYHOST}" ]]; then + echo "Setting custom 'relayhost' to '${POSTFIX_RELAYHOST}'" + postconf relayhost="${POSTFIX_RELAYHOST}" +else + echo "Revert 'relayhost' to default (unset)" + postconf -# relayhost +fi + +echo "Disable chroot for the smtp service" +postconf -F smtp/inet/chroot=n +postconf -F smtp/unix/chroot=n + +echo "Starting postfix in the foreground" +postfix start-fg diff --git a/bin/travis-ci/check_tag.sh b/bin/travis-ci/check_tag.sh new file mode 100644 index 0000000..57420af --- /dev/null +++ b/bin/travis-ci/check_tag.sh @@ -0,0 +1,48 @@ +#!/bin/bash +# +# Copyright (c) 2018 SD Elements Inc. +# +# All Rights Reserved. +# +# NOTICE: All information contained herein is, and remains +# the property of SD Elements Incorporated and its suppliers, +# if any. The intellectual and technical concepts contained +# herein are proprietary to SD Elements Incorporated +# and its suppliers and may be covered by U.S., Canadian and other Patents, +# patents in process, and are protected by trade secret or copyright law. +# Dissemination of this information or reproduction of this material +# is strictly forbidden unless prior written permission is obtained +# from SD Elements Inc.. +# Version + +set -eo pipefail + +# echo "Installing shtdlib" +shtdlib_local_path="/usr/local/bin/shtdlib.sh" +sudo curl -s -L -o "${shtdlib_local_path}" https://github.com/sdelements/shtdlib/raw/master/shtdlib.sh +sudo chmod 775 "${shtdlib_local_path}" +# shellcheck disable=SC1091,SC1090 +source "${shtdlib_local_path}" +color_echo green "shtdlib.sh installed successfully" + +# Get the latest tag from GitHub +latest_tag="$(git fetch -t && git tag -l | sort --version-sort | tail -n1)" +color_echo green "Latest Git tag: '${latest_tag}'" + +# Get the latest tag from the CHANGELOG +changelog_ver="$(grep -oP '\[v\d\.\d\.\d\]' CHANGELOG.md | tr -d '[]' | sort -nr | head -n1)" +color_echo green "CHANGELOG version: '${changelog_ver}'" + +# Validate version strings +version_pattern='^v\d\.\d\.\d$' +echo "${latest_tag}" | grep -qP ${version_pattern} || ( color_echo red "Invalid tag from repo: '${latest_tag}'" && exit 1 ) +echo "${changelog_ver}" | grep -qP ${version_pattern} || ( color_echo red "Invalid tag from CHANGELOG: '${changelog_ver}'" && exit 1 ) + +# Ensure tags in CHANGELOG and iteration are greater than highest repo tag +if [ "${latest_tag}" = "${changelog_ver}" ] \ + || ! compare_versions "${latest_tag}" "${changelog_ver}"; then + color_echo red "Error: Version in CHANGELOG.md not updated" + exit 1 +else + color_echo green "Version bumps PASS!" +fi diff --git a/bin/travis-ci/docker_build.sh b/bin/travis-ci/docker_build.sh new file mode 100644 index 0000000..d15aa5c --- /dev/null +++ b/bin/travis-ci/docker_build.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# +# Copyright (c) 2018 SD Elements Inc. +# +# All Rights Reserved. +# +# NOTICE: All information contained herein is, and remains +# the property of SD Elements Incorporated and its suppliers, +# if any. The intellectual and technical concepts contained +# herein are proprietary to SD Elements Incorporated +# and its suppliers and may be covered by U.S., Canadian and other Patents, +# patents in process, and are protected by trade secret or copyright law. +# Dissemination of this information or reproduction of this material +# is strictly forbidden unless prior written permission is obtained +# from SD Elements Inc.. +# Version + +set -eo pipefail + +# Build image +docker-compose --file docker-compose.yml --file dc.build.yml build --no-cache nginx-php-moodle +docker images diff --git a/bin/travis-ci/docker_publish.sh b/bin/travis-ci/docker_publish.sh new file mode 100644 index 0000000..74063bd --- /dev/null +++ b/bin/travis-ci/docker_publish.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# +# Copyright (c) 2018 SD Elements Inc. +# +# All Rights Reserved. +# +# NOTICE: All information contained herein is, and remains +# the property of SD Elements Incorporated and its suppliers, +# if any. The intellectual and technical concepts contained +# herein are proprietary to SD Elements Incorporated +# and its suppliers and may be covered by U.S., Canadian and other Patents, +# patents in process, and are protected by trade secret or copyright law. +# Dissemination of this information or reproduction of this material +# is strictly forbidden unless prior written permission is obtained +# from SD Elements Inc.. +# Version + +set -eo pipefail + +# Log into our Docker registry +echo "${DOCKER_REGISTRY_PASSWORD}" | docker login -u "${DOCKER_REGISTRY_USER}" --password-stdin "${DOCKER_REGISTRY_URL}" + +# Push image +docker-compose --file docker-compose.yml --file dc.build.yml push nginx-php-moodle diff --git a/bin/travis-ci/docker_upgrade.sh b/bin/travis-ci/docker_upgrade.sh new file mode 100644 index 0000000..fa9c1e7 --- /dev/null +++ b/bin/travis-ci/docker_upgrade.sh @@ -0,0 +1,30 @@ +#!/bin/bash +# +# Copyright (c) 2018 SD Elements Inc. +# +# All Rights Reserved. +# +# NOTICE: All information contained herein is, and remains +# the property of SD Elements Incorporated and its suppliers, +# if any. The intellectual and technical concepts contained +# herein are proprietary to SD Elements Incorporated +# and its suppliers and may be covered by U.S., Canadian and other Patents, +# patents in process, and are protected by trade secret or copyright law. +# Dissemination of this information or reproduction of this material +# is strictly forbidden unless prior written permission is obtained +# from SD Elements Inc.. +# Version + +set -eo pipefail + +# Update docker +sudo apt-get update +sudo apt-get --yes install docker-ce + +# Update docker-compose +sudo rm /usr/local/bin/docker-compose +sudo curl -L "https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose +sudo chmod +x /usr/local/bin/docker-compose + +# Verify +docker version && docker-compose --version diff --git a/supervisor.conf b/supervisor.conf new file mode 100644 index 0000000..4e97f70 --- /dev/null +++ b/supervisor.conf @@ -0,0 +1,13 @@ +[supervisord] +nodaemon=true + +[program:postfix] +command=/postfix_init.sh + +[program:rsyslog] +command=/usr/sbin/rsyslogd -n + +[program:readlog] +command=/usr/bin/tail -F /var/log/mail.log +stdout_logfile=/dev/fd/1 +stdout_logfile_maxbytes=0 From 087b5a450b15617ffcda4ebbbabb57f6f037502a Mon Sep 17 00:00:00 2001 From: Hrdayesh Patel Date: Mon, 24 Sep 2018 13:58:26 -0400 Subject: [PATCH 2/5] Update README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 99a21c8..4b2cfa7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # postfix-docker -This repo deploys `postfix` inside a Docker container. +This repo deploys and configures `postfix` inside a Docker container. ## Configuration @@ -9,4 +9,4 @@ See `./bin/postfix_init.sh` for configuration parameters that are available via ## Features * Supervisor to manaage `postfix`, `rsyslog`, and log output to `stdout` -* Logging with `rsyslog` +* Logging support is added with `rsyslog` From 345f4c67af343be57e8e3cdde3053e53218e84de Mon Sep 17 00:00:00 2001 From: Hrdayesh Patel Date: Mon, 24 Sep 2018 14:01:15 -0400 Subject: [PATCH 3/5] Fix linter command --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index bcb530c..6f90a50 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,8 +16,7 @@ jobs: - name: Dockerfile linter language: minimal script: - - docker run --rm -v $PWD:/root/ projectatomic/dockerfile-lint dockerfile_lint -f ./deb-builder/Dockerfile - - docker run --rm -v $PWD:/root/ projectatomic/dockerfile-lint dockerfile_lint -f ./nginx-php-moodle/Dockerfile + - docker run --rm -v $PWD:/root/ projectatomic/dockerfile-lint dockerfile_lint -f ./Dockerfile - stage: "SDLC Tasks" name: Tag & iteration update sudo: required From 09c8390e43a820987b4d1eb820e680e7860fd1d7 Mon Sep 17 00:00:00 2001 From: Hrdayesh Patel Date: Mon, 24 Sep 2018 14:09:58 -0400 Subject: [PATCH 4/5] Update secrets and file format --- .travis.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6f90a50..f438ba4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -# Define build stages + stages: - Tests - SDLC Tasks @@ -26,9 +26,9 @@ jobs: - stage: Build and Publish name: Docker image env: - - secure: f2d/XXnpYhkG543Uu/MByFlMDAYyYCI/SckSralR0exI10DLBsZ7pixRjT7D+SKwMFkaIWDq5m5HBW4uFeZCqPKm/gOiLpYZyCOPOohg2Fr3//i1Oy4jWNmpq6fb6hwjbOcgdAjLxRHwYmXl8aD6Gb4SyGQSbxj/WnF7vgG87/15HG+m+7l23ODvESxbNrzE+YWbJ21BXdIjpkwsJFKNWGG8NvN7kQqKHa9z8t+TSr2f56jRLZMEcqql/+YGRqWmqskqbv3qeHNnPlF7aUhtVL0GFs9gmBtzVjP/xvRtwGSG1r9sl888z2EPiwtMBhK7G3fS5m6bKuwu43zPcVl2OGxUmUBQ2zpXKXH3aBHD5GOlSjua7LRmV1X/TrgUY4ciW01ZNpUkH4pTojajPKs5Vph8BxOMe2GsfzwVQyPo/FZdlLCb3mKXP8DwISOYoAIOzL/F1vcejA2SOsgBoglywnYavJYdDaFRCPUvjUtbFTY10qb2pwSJ7Mm1ZnAirY4Jz048N7PH2j0INkHCvZEHP+cyHNMdct7oQfep/S3JlPjjnI773MdaI9wLOvGE9d73JBhMO1ylIT7ZWY+W1ZAurwN3/8dYhFX0swoeLt5Eej5Tr9UprugQjeqYDdUtmZne8SM7wYicbjcFKI6PuHWAmrXhWcGL2VFw82TRzEk9oSI= - - secure: luAVdoARjWTC/PmF3CmqHe8JCv9P0HjfA6epcdPP3SGC4AJrbS3bDC2aYF0F6c79TS6kAgnQ+zfJ71MOD8nS0393oAmsRPdkJYnO9wIwJdtwZmDBhsjrhQ2sMQgBuiRsndTXGIPVfoFKIIS9Mje4O0nYYm56zSRUOjllrx0ui0GAKljCLAVqxF+iXw9ZjJabXVASixcmG19ch+d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sudo: required services: @@ -36,5 +36,4 @@ jobs: script: - bash bin/travis-ci/docker_upgrade.sh - bash bin/travis-ci/docker_build.sh - # Publish if we're on or pushing to master - if [[ ${TRAVIS_BRANCH} = "master" ]]; then bash bin/travis-ci/docker_publish.sh; fi From 15f590ca17af5932d224cbd3f2fe9237b6baea1b Mon Sep 17 00:00:00 2001 From: Hrdayesh Patel Date: Mon, 24 Sep 2018 14:32:54 -0400 Subject: [PATCH 5/5] Fix docker scripts for postfix --- bin/travis-ci/docker_build.sh | 2 +- bin/travis-ci/docker_publish.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/travis-ci/docker_build.sh b/bin/travis-ci/docker_build.sh index d15aa5c..7b8483c 100644 --- a/bin/travis-ci/docker_build.sh +++ b/bin/travis-ci/docker_build.sh @@ -18,5 +18,5 @@ set -eo pipefail # Build image -docker-compose --file docker-compose.yml --file dc.build.yml build --no-cache nginx-php-moodle +docker build --no-cache --tag "${DOCKER_REGISTRY_URL}/postfix" . docker images diff --git a/bin/travis-ci/docker_publish.sh b/bin/travis-ci/docker_publish.sh index 74063bd..57f3f20 100644 --- a/bin/travis-ci/docker_publish.sh +++ b/bin/travis-ci/docker_publish.sh @@ -21,4 +21,4 @@ set -eo pipefail echo "${DOCKER_REGISTRY_PASSWORD}" | docker login -u "${DOCKER_REGISTRY_USER}" --password-stdin "${DOCKER_REGISTRY_URL}" # Push image -docker-compose --file docker-compose.yml --file dc.build.yml push nginx-php-moodle +docker push "${DOCKER_REGISTRY_URL}/postfix:latest"