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:
parent
2f9d7b32ed
commit
04e6220993
2
.env
2
.env
@ -3,4 +3,4 @@ POSTGRES_PASS=zammad
|
|||||||
POSTGRES_USER=zammad
|
POSTGRES_USER=zammad
|
||||||
RESTART=always
|
RESTART=always
|
||||||
# don't forget to add the minus before the version
|
# don't forget to add the minus before the version
|
||||||
VERSION=-3.6.0-1
|
VERSION=-3.6.0-20
|
||||||
|
11
.github/ISSUE_TEMPLATE.md
vendored
11
.github/ISSUE_TEMPLATE.md
vendored
@ -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 *
|
* The upper textblock will be removed automatically when you submit your issue *
|
||||||
-->
|
-->
|
||||||
|
|
||||||
### Infos:
|
# Infos
|
||||||
|
|
||||||
* Docker version:
|
* Docker version:
|
||||||
* Docker-compose version:
|
* Docker-compose version:
|
||||||
* Operating system (Docker host):
|
* Operating system (Docker host):
|
||||||
|
|
||||||
|
# Expected behavior
|
||||||
### Expected behavior:
|
|
||||||
|
|
||||||
*
|
*
|
||||||
|
|
||||||
|
# Actual behavior
|
||||||
### Actual behavior:
|
|
||||||
|
|
||||||
*
|
*
|
||||||
|
|
||||||
|
# Steps to reproduce the behavior
|
||||||
### Steps to reproduce the behavior:
|
|
||||||
|
|
||||||
*
|
*
|
||||||
|
15
.github/lint-scripts.sh
vendored
15
.github/lint-scripts.sh
vendored
@ -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
2
.github/linters/.markdown-lint.yml
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
MD013:
|
||||||
|
line_length: 500
|
68
.github/workflows/ci.yaml
vendored
68
.github/workflows/ci.yaml
vendored
@ -4,54 +4,50 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint-bash-scripts:
|
codespell:
|
||||||
runs-on: ubuntu-latest
|
name: codespell
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v2
|
||||||
- name: Lint Bash scripts
|
- name: Codespell
|
||||||
uses: docker://koalaman/shellcheck-alpine:v0.7.0
|
uses: codespell-project/actions-codespell@master
|
||||||
with:
|
with:
|
||||||
args: .github/lint-scripts.sh
|
skip: .git
|
||||||
|
check_filenames: true
|
||||||
lint-docker-files:
|
check_hidden: true
|
||||||
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
|
|
||||||
|
|
||||||
lint-docker-compose-file:
|
lint-docker-compose-file:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v1
|
||||||
- name: lint zammad docker-compose file
|
- name: lint zammad docker-compose file
|
||||||
run: docker-compose config
|
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:
|
build-and-run-docker-compose:
|
||||||
needs:
|
needs:
|
||||||
- lint-bash-scripts
|
- codespell
|
||||||
- lint-docker-files
|
|
||||||
- lint-docker-compose-file
|
- lint-docker-compose-file
|
||||||
|
- super-linter
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v1
|
||||||
- name: build docker containers
|
- name: build docker containers
|
||||||
run: .github/docker-image-build.sh
|
run: .github/docker-image-build.sh
|
||||||
- name: use images build by ci
|
- name: use images build by ci
|
||||||
run: sed -i -e 's#${IMAGE_REPO}:##g' -e 's#${VERSION}##g' docker-compose.yml
|
run: sed -i -e 's#${IMAGE_REPO}:##g' -e 's#${VERSION}##g' docker-compose.yml
|
||||||
- name: run docker-compose up
|
- name: run docker-compose up
|
||||||
@ -62,17 +58,17 @@ jobs:
|
|||||||
run: .github/tests.sh
|
run: .github/tests.sh
|
||||||
|
|
||||||
run-remote-image-docker-compose:
|
run-remote-image-docker-compose:
|
||||||
needs:
|
needs:
|
||||||
- lint-bash-scripts
|
- codespell
|
||||||
- lint-docker-files
|
|
||||||
- lint-docker-compose-file
|
- lint-docker-compose-file
|
||||||
|
- super-linter
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v1
|
||||||
- name: pull docker-compose images
|
- name: pull docker-compose images
|
||||||
run: docker-compose pull
|
run: docker-compose pull
|
||||||
- name: run docker-compose up
|
- name: run docker-compose up
|
||||||
run: docker-compose up --detach
|
run: docker-compose up --detach
|
||||||
- name: add autowizard file
|
- name: add autowizard file
|
||||||
|
26
README.md
26
README.md
@ -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?
|
License (AGPL). Do you receive many e-mails and want to answer them with a team of agents?
|
||||||
You're going to love Zammad!
|
You're going to love Zammad!
|
||||||
|
|
||||||
|
## Use case for this repo
|
||||||
## What is zammad-docker-compose repo for?
|
|
||||||
|
|
||||||
This repo is meant to be the starting point for somebody who likes to use dockerized multi-container Zammad in production.
|
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
|
## 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
|
## 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.
|
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.
|
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`
|
`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.
|
2. 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`
|
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.
|
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.
|
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
|
## 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
|
## 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
|
### From =< 3.3.0-12
|
||||||
|
|
||||||
We've updated the Elasticsearch image from 5.6 to 7.6.
|
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.
|
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:
|
Do the following to empty the ES docker volume:
|
||||||
|
|
||||||
```
|
```console
|
||||||
docker-compose stop
|
docker-compose stop
|
||||||
set -o pipefail DOCKER_VOLUME="$(docker volume inspect zammaddockercompose_elasticsearch-data | grep Mountpoint | sed -e 's#.*": "##g' -e 's#",##')/*"
|
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!
|
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:
|
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-compose start
|
||||||
docker exec -it zammaddockercompose_zammad-postgresql_1 bash
|
docker exec -it zammaddockercompose_zammad-postgresql_1 bash
|
||||||
psql --username postgres --dbname zammad_production
|
psql --username postgres --dbname zammad_production
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM postgres:9.6.17-alpine
|
FROM postgres:9.6.20-alpine
|
||||||
|
|
||||||
ARG BUILD_DATE
|
ARG BUILD_DATE
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ if [ "$1" = 'zammad-init' ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${ELASTICSEARCH_REINDEX}" == "true" ]; then
|
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..."
|
echo "rebuilding es searchindex..."
|
||||||
bundle exec rake searchindex:rebuild
|
bundle exec rake searchindex:rebuild
|
||||||
fi
|
fi
|
||||||
|
@ -34,7 +34,7 @@ services:
|
|||||||
- zammad-postgresql
|
- zammad-postgresql
|
||||||
environment:
|
environment:
|
||||||
- POSTGRESQL_USER=${POSTGRES_USER}
|
- POSTGRESQL_USER=${POSTGRES_USER}
|
||||||
- POSTGRESQL_PASS=${POSTGRES_PASS}
|
- POSTGRESQL_PASS=${POSTGRES_PASS}
|
||||||
image: ${IMAGE_REPO}:zammad${VERSION}
|
image: ${IMAGE_REPO}:zammad${VERSION}
|
||||||
links:
|
links:
|
||||||
- zammad-elasticsearch
|
- zammad-elasticsearch
|
||||||
@ -45,7 +45,7 @@ services:
|
|||||||
|
|
||||||
zammad-memcached:
|
zammad-memcached:
|
||||||
command: memcached -m 256M
|
command: memcached -m 256M
|
||||||
image: memcached:1.6.7-alpine
|
image: memcached:1.6.9-alpine
|
||||||
restart: ${RESTART}
|
restart: ${RESTART}
|
||||||
|
|
||||||
zammad-nginx:
|
zammad-nginx:
|
||||||
|
Loading…
Reference in New Issue
Block a user