added codespell & superlinter / updated versions (#183)

* added codespell linter
* added superlinter
* raised env version to 3.6.0-20
* updated memcache container
* updated postgres container
* some readme fixes
* use fixed ubuntu 20.04 version for all github action steps
This commit is contained in:
André Bauer 2020-12-07 13:41:12 +01:00 committed by GitHub
parent 2f9d7b32ed
commit 04e6220993
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 55 additions and 77 deletions

2
.env
View File

@ -3,4 +3,4 @@ POSTGRES_PASS=zammad
POSTGRES_USER=zammad
RESTART=always
# don't forget to add the minus before the version
VERSION=-3.6.0-1
VERSION=-3.6.0-20

View File

@ -8,23 +8,20 @@ Hi there - thanks for filling an issue. Please ensure the following things befor
* The upper textblock will be removed automatically when you submit your issue *
-->
### Infos:
# Infos
* Docker version:
* Docker-compose version:
* Operating system (Docker host):
### Expected behavior:
# Expected behavior
*
### Actual behavior:
# Actual behavior
*
### Steps to reproduce the behavior:
# Steps to reproduce the behavior
*

View File

@ -1,15 +0,0 @@
#!/bin/sh
#
# lint bash scripts
#
set -o errexit
TMP_FILE="$(mktemp)"
find . -type f -name "*.sh" > "${TMP_FILE}"
while read -r FILE; do
echo lint "${FILE}"
shellcheck -x "${FILE}"
done < "${TMP_FILE}"

2
.github/linters/.markdown-lint.yml vendored Normal file
View File

@ -0,0 +1,2 @@
MD013:
line_length: 500

View File

@ -4,54 +4,50 @@ on:
pull_request:
jobs:
lint-bash-scripts:
runs-on: ubuntu-latest
codespell:
name: codespell
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Lint Bash scripts
uses: docker://koalaman/shellcheck-alpine:v0.7.0
- name: Checkout Code
uses: actions/checkout@v2
- name: Codespell
uses: codespell-project/actions-codespell@master
with:
args: .github/lint-scripts.sh
lint-docker-files:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: lint zammad dockerfile
uses: brpaz/hadolint-action@master
with:
dockerfile: containers/zammad/Dockerfile
- name: lint elasticsearch dockerfile
uses: brpaz/hadolint-action@master
with:
dockerfile: containers/zammad-elasticsearch/Dockerfile
- name: lint postgresql dockerfile
uses: brpaz/hadolint-action@master
with:
dockerfile: containers/zammad-postgresql/Dockerfile
skip: .git
check_filenames: true
check_hidden: true
lint-docker-compose-file:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v1
- name: lint zammad docker-compose file
run: docker-compose config
super-linter:
runs-on: ubuntu-20.04
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Lint Code Base
uses: github/super-linter@v3
env:
DEFAULT_BRANCH: master
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-and-run-docker-compose:
needs:
- lint-bash-scripts
- lint-docker-files
needs:
- codespell
- lint-docker-compose-file
- super-linter
timeout-minutes: 20
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v1
- name: build docker containers
run: .github/docker-image-build.sh
run: .github/docker-image-build.sh
- name: use images build by ci
run: sed -i -e 's#${IMAGE_REPO}:##g' -e 's#${VERSION}##g' docker-compose.yml
- name: run docker-compose up
@ -62,17 +58,17 @@ jobs:
run: .github/tests.sh
run-remote-image-docker-compose:
needs:
- lint-bash-scripts
- lint-docker-files
needs:
- codespell
- lint-docker-compose-file
- super-linter
timeout-minutes: 10
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v1
- name: pull docker-compose images
run: docker-compose pull
run: docker-compose pull
- name: run docker-compose up
run: docker-compose up --detach
- name: add autowizard file

View File

@ -6,16 +6,13 @@ twitter, chat and e-mails. It is distributed under the GNU AFFERO General Public
License (AGPL). Do you receive many e-mails and want to answer them with a team of agents?
You're going to love Zammad!
## What is zammad-docker-compose repo for?
## Use case for this repo
This repo is meant to be the starting point for somebody who likes to use dockerized multi-container Zammad in production.
## Getting started with zammad-docker-compose
https://docs.zammad.org/en/latest/install-docker-compose.html
<https://docs.zammad.org/en/latest/install-docker-compose.html>
## CI Status
@ -26,19 +23,20 @@ https://docs.zammad.org/en/latest/install-docker-compose.html
In environments with more then one web applications it is necessary to use a reverse proxy to route connections to port 80 and 443 to the right application.
To run Zammad behind a revers proxy, we provide `docker-compose.proxy-example.yml` as a starting point.
1. Copy `./.examples/proxy/docker-compose.proxy-example.yml` to your own configuration, e.g. `./docker-compose.prod.yml`
1. Copy `./.examples/proxy/docker-compose.proxy-example.yml` to your own configuration, e.g. `./docker-compose.prod.yml`
`cp ./.examples/proxy/docker-compose.proxy-example.yml ./docker-compose.prod.yml`
1. Modify the environment variable `VIRTUAL_HOST` and the name of the external network in `./docker-compose.prod.yml` to fit your environment.
1. Run docker-composer commands with the default and your configuration, e.g. `docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d`
2. Modify the environment variable `VIRTUAL_HOST` and the name of the external network in `./docker-compose.prod.yml` to fit your environment.
3. Run docker-composer commands with the default and your configuration, e.g. `docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d`
See `.examples/proxy/docker-compose.yml` for an example proxy project.
Like this, you can add your `docker-compose.prod.yml` to a branch of your Git repository and stay up to date by merging changes to your branch.
## Using Rancher
* RANCHER_URL=http://RANCHER_HOST:8080 rancher-compose --env-file=.env up
```console
RANCHER_URL=http://RANCHER_HOST:8080 rancher-compose --env-file=.env up
```
## Running without Elasticsearch
@ -50,11 +48,11 @@ Elasticsearch is enabled by default in the example `docker-compose.yml` file. It
### From =< 3.3.0-12
We've updated the Elasticsearch image from 5.6 to 7.6.
As there is no direct upgrade path we have to delete all Elasticsearch indicies and rebuild them.
We've updated the Elasticsearch image from 5.6 to 7.6.
As there is no direct upgrade path we have to delete all Elasticsearch indices and rebuild them.
Do the following to empty the ES docker volume:
```
```console
docker-compose stop
set -o pipefail DOCKER_VOLUME="$(docker volume inspect zammaddockercompose_elasticsearch-data | grep Mountpoint | sed -e 's#.*": "##g' -e 's#",##')/*"
echo "${DOCKER_VOLUME}" #check this is a valid docker volume path! if not do not proceed or you might lose data!
@ -64,7 +62,7 @@ docker-compose start
To workaround the [changes in the PostgreSQL 9.6 container](https://github.com/docker-library/postgres/commit/f1bc8782e7e57cc403d0b32c0e24599535859f76) do the following:
```
```console
docker-compose start
docker exec -it zammaddockercompose_zammad-postgresql_1 bash
psql --username postgres --dbname zammad_production

View File

@ -1,4 +1,4 @@
FROM postgres:9.6.17-alpine
FROM postgres:9.6.20-alpine
ARG BUILD_DATE

View File

@ -103,7 +103,7 @@ if [ "$1" = 'zammad-init' ]; then
fi
if [ "${ELASTICSEARCH_REINDEX}" == "true" ]; then
if ! curl -s ${SSL_SKIP_VERIFY} ${ELASTICSEARCH_SCHEMA}://${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}/_cat/indices | grep -q zammad; then
if ! curl -s "${SSL_SKIP_VERIFY}" "${ELASTICSEARCH_SCHEMA}://${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}/_cat/indices" | grep -q zammad; then
echo "rebuilding es searchindex..."
bundle exec rake searchindex:rebuild
fi

View File

@ -34,7 +34,7 @@ services:
- zammad-postgresql
environment:
- POSTGRESQL_USER=${POSTGRES_USER}
- POSTGRESQL_PASS=${POSTGRES_PASS}
- POSTGRESQL_PASS=${POSTGRES_PASS}
image: ${IMAGE_REPO}:zammad${VERSION}
links:
- zammad-elasticsearch
@ -45,7 +45,7 @@ services:
zammad-memcached:
command: memcached -m 256M
image: memcached:1.6.7-alpine
image: memcached:1.6.9-alpine
restart: ${RESTART}
zammad-nginx: