parent
7fe85067fa
commit
33beea77df
8
.env
8
.env
@ -1,8 +1,6 @@
|
||||
# don't forget to add the minus before the version
|
||||
# example: VERSION=-3.2.0-12
|
||||
IMAGE_REPO=zammad/zammad-docker-compose
|
||||
VERSION=-3.2.0-13
|
||||
RESTART=always
|
||||
POSTGRES_USER=zammad
|
||||
POSTGRES_PASS=zammad
|
||||
|
||||
POSTGRES_USER=zammad
|
||||
RESTART=always
|
||||
VERSION=-3.2.0-13
|
||||
|
8
.github/lint-scripts.sh
vendored
8
.github/lint-scripts.sh
vendored
@ -5,15 +5,9 @@
|
||||
|
||||
set -o errexit
|
||||
|
||||
CONFIG_DIR=".github"
|
||||
HOOKS_DIR="hooks"
|
||||
CONTAINER_DIR="containers"
|
||||
|
||||
TMP_FILE="$(mktemp)"
|
||||
|
||||
find "${CONFIG_DIR}" -type f -name "*.sh" > "${TMP_FILE}"
|
||||
find "${HOOKS_DIR}" -type f -name "*.sh" >> "${TMP_FILE}"
|
||||
find "${CONTAINER_DIR}" -type f -name "*.sh" >> "${TMP_FILE}"
|
||||
find . -type f -name "*.sh" > "${TMP_FILE}"
|
||||
|
||||
while read -r FILE; do
|
||||
echo lint "${FILE}"
|
||||
|
20
.github/tests.sh
vendored
Executable file
20
.github/tests.sh
vendored
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# run zammad tests
|
||||
#
|
||||
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
|
||||
docker-compose logs --timestamps --follow &
|
||||
|
||||
until (curl -I --silent --fail localhost | grep -iq "HTTP/1.1 200 OK"); do
|
||||
echo "wait for zammad to be ready..."
|
||||
sleep 15
|
||||
done
|
||||
|
||||
sleep 10
|
||||
|
||||
echo
|
||||
echo "Success - Zammad is up :)"
|
||||
echo
|
33
.github/workflows/ci.yaml
vendored
33
.github/workflows/ci.yaml
vendored
@ -14,14 +14,37 @@ jobs:
|
||||
with:
|
||||
args: .github/lint-scripts.sh
|
||||
|
||||
install-docker-compose:
|
||||
name: install-docker-compose
|
||||
lint-docker-files:
|
||||
runs-on: ubuntu-latest
|
||||
needs: lint-bash-scripts
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
- name: lint zammad dockerfile
|
||||
uses: brpaz/hadolint-action@master
|
||||
with:
|
||||
dockerfile: containers/zammad-elasticsearch/Dockerfile
|
||||
- name: lint elasticsearch dockerfile
|
||||
uses: brpaz/hadolint-action@master
|
||||
with:
|
||||
dockerfile: containers/zammad-postgresql/Dockerfile
|
||||
- name: lint postgresql dockerfile
|
||||
uses: brpaz/hadolint-action@master
|
||||
with:
|
||||
dockerfile: containers/zammad/Dockerfile
|
||||
|
||||
test-docker-compose:
|
||||
timeout-minutes: 30
|
||||
runs-on: ubuntu-latest
|
||||
needs: lint-docker-files
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
- name: get containers
|
||||
- name: pull container images
|
||||
run: docker-compose pull
|
||||
- name: install
|
||||
run: docker-compose up
|
||||
- name: run docker-compose up
|
||||
run: docker-compose up --detach
|
||||
- name: run tests
|
||||
run: .github/tests.sh
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
MAINTAINER Zammad <info@zammad.org>
|
||||
ARG BUILD_DATE
|
||||
|
||||
LABEL org.label-schema.build-date="$BUILD_DATE" \
|
||||
|
@ -1,5 +1,4 @@
|
||||
FROM docker.elastic.co/elasticsearch/elasticsearch:7.6.0
|
||||
MAINTAINER Zammad <info@zammad.org>
|
||||
ARG BUILD_DATE
|
||||
|
||||
LABEL org.label-schema.build-date="$BUILD_DATE" \
|
||||
@ -13,4 +12,6 @@ LABEL org.label-schema.build-date="$BUILD_DATE" \
|
||||
org.label-schema.schema-version="3.2.0" \
|
||||
org.label-schema.docker.cmd="sysctl -w vm.max_map_count=262144;docker-compose up"
|
||||
|
||||
SHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"]
|
||||
|
||||
RUN yes | /usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment
|
||||
|
@ -1,6 +1,5 @@
|
||||
FROM postgres:9.6.17-alpine
|
||||
|
||||
MAINTAINER Zammad <info@zammad.org>
|
||||
ARG BUILD_DATE
|
||||
|
||||
LABEL org.label-schema.build-date="$BUILD_DATE" \
|
||||
@ -14,6 +13,8 @@ LABEL org.label-schema.build-date="$BUILD_DATE" \
|
||||
org.label-schema.schema-version="3.2.0" \
|
||||
org.label-schema.docker.cmd="sysctl -w vm.max_map_count=262144;docker-compose up"
|
||||
|
||||
SHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"]
|
||||
|
||||
# copy backup script
|
||||
COPY containers/zammad-postgresql/backup.sh /usr/local/bin/
|
||||
RUN chmod +x /usr/local/bin/backup.sh
|
||||
|
2
containers/zammad-postgresql/backup.sh
Normal file → Executable file
2
containers/zammad-postgresql/backup.sh
Normal file → Executable file
@ -33,7 +33,7 @@ function zammad_backup {
|
||||
fi
|
||||
|
||||
#db backup
|
||||
pg_dump --dbname=postgresql://"${POSTGRESQL_USER}:${POSTGRESQL_PASSWORD}"@"${POSTGRESQL_HOST}":"${POSTGRESQL_PORT}"/"${POSTGRESQL_DB}" | gzip > "${BACKUP_DIR}"/"${TIMESTAMP}"_zammad_db.psql.gz
|
||||
pg_dump --dbname=postgresql://"${POSTGRESQL_USER}:${POSTGRESQL_PASSWORD}@${POSTGRESQL_HOST}:${POSTGRESQL_PORT}/${POSTGRESQL_DB}" | gzip > "${BACKUP_DIR}"/"${TIMESTAMP}"_zammad_db.psql.gz
|
||||
}
|
||||
|
||||
if [ "$1" = 'zammad-backup' ]; then
|
||||
|
@ -2,7 +2,6 @@ FROM ruby:2.5.5-slim AS builder
|
||||
# note: zammad is currently incompatible to alpine because of:
|
||||
# https://github.com/docker-library/ruby/issues/113
|
||||
|
||||
MAINTAINER Zammad <info@zammad.org>
|
||||
ARG BUILD_DATE
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
@ -17,6 +16,8 @@ ENV ZAMMAD_READY_FILE ${ZAMMAD_DIR}/tmp/zammad.ready
|
||||
ENV ZAMMAD_TMP_DIR /tmp/zammad-${GIT_BRANCH}
|
||||
ENV ZAMMAD_USER zammad
|
||||
|
||||
SHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"]
|
||||
|
||||
# install zammad
|
||||
COPY containers/zammad/setup.sh /tmp
|
||||
RUN chmod +x /tmp/setup.sh; \
|
||||
@ -25,7 +26,6 @@ RUN chmod +x /tmp/setup.sh; \
|
||||
|
||||
FROM ruby:2.5.5-slim
|
||||
|
||||
MAINTAINER Zammad <info@zammad.org>
|
||||
ARG BUILD_DATE
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
|
1
containers/zammad/setup.sh
Normal file → Executable file
1
containers/zammad/setup.sh
Normal file → Executable file
@ -10,6 +10,7 @@ fi
|
||||
|
||||
apt-get update
|
||||
apt-get upgrade -y
|
||||
# shellcheck disable=SC2086
|
||||
apt-get install -y --no-install-recommends ${PACKAGES}
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user