Compare commits

..

19 Commits

Author SHA1 Message Date
André Bauer
799edd7863
Update zammad to 6.0.0-66 (#363) 2023-07-18 18:47:20 +02:00
André Bauer
6606e8e2ca
update zammad to 6.0.0-32 (#353) 2023-06-22 20:16:10 +02:00
André Bauer
662aa8f512
update dockerhub pulls badge (#352) 2023-06-21 16:27:42 +02:00
Martin Gruner
ffa1268a2a
Update to Zammad 6.0. (#347)
* Update to Zammad 6.0.

* adjust compose and env / change docker registry

Signed-off-by: André Bauer <andre.bauer@staffbase.com>

---------

Signed-off-by: André Bauer <andre.bauer@staffbase.com>
Co-authored-by: André Bauer <andre.bauer@staffbase.com>
2023-06-21 16:05:23 +02:00
André Bauer
3338cbeb22
sort vars (#351) 2023-06-14 13:27:25 +02:00
Jan Kiesewetter
9a547c67a9
Define database name (#343)
Set the database name to the default of the Zammad image to avoid an unused database with the name of the POSTGRES_USER var.

See default database name:
163377fc65/contrib/docker/docker-entrypoint.sh (L20)

See PostgreSQL image documentation:
https://hub.docker.com/_/postgres

POSTGRES_DB
This optional environment variable can be used to define a different name for the default database
that is created when the image is first started. If it is not specified, then the value of POSTGRES_USER will be used.
2023-06-14 11:36:01 +02:00
André Bauer
1c52589095
update zammad to 5.4.1-29 (#340) 2023-05-14 13:23:10 +02:00
Jensa
281b5f317f
timed backup script with backup time (#339)
* Update backup.sh

- new zammad-timed-backup which uses fixed backup time $BACKUP_TIME

* Update docker-compose.yml

- $BACKUP_TIME added
- timed backup as command

* merge request and linting fixes

* arithmetic linting fix

* not related to merge request but fixes linting in check_railsserver_available
2023-05-12 20:51:57 +02:00
dependabot[bot]
ef8830e636
Bump github/super-linter from 4 to 5 (#333)
Bumps [github/super-linter](https://github.com/github/super-linter) from 4 to 5.
- [Release notes](https://github.com/github/super-linter/releases)
- [Changelog](https://github.com/github/super-linter/blob/main/docs/release-process.md)
- [Commits](https://github.com/github/super-linter/compare/v4...v5)

---
updated-dependencies:
- dependency-name: github/super-linter
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-10 13:14:45 +02:00
Martin Gruner
a8911b1359 Maintenance: Update README. 2023-04-20 13:41:51 +02:00
Marcel Herrguth
1f32908c23
Merge pull request #332 from sdm216/master
Update to Zammad 5.4.1
2023-04-12 16:53:42 +02:00
sdm216
360324353f
Update .env 2023-04-12 10:41:14 -04:00
Martin Gruner
e5b0fedfe6
Maintenance: Switch to Zammad 5.4.0. (#328) 2023-03-14 11:50:16 +01:00
Jan Kiesewetter
d588f2ff65
Define PostgreSQL version in .env (#322)
Resolves: #321
2022-12-23 21:21:40 +01:00
Fonata
01fe85d74c
Fix small spelling and typography mistakes in README (#317) 2022-12-23 21:20:50 +01:00
André Bauer
abd9cd631d
update zammad to 5.3.1-6 (#323) 2022-12-23 21:17:24 +01:00
André Bauer
d397322bae
update docker image to 5.3.0-9 (#316) 2022-12-03 14:18:22 +01:00
André Bauer
ae716aed3d
update config 2022-11-23 00:39:57 +01:00
André Bauer
ad516bdfd6
update docker image to 5.3.0-2 (#314) 2022-11-23 00:32:55 +01:00
8 changed files with 74 additions and 37 deletions

11
.env
View File

@ -1,7 +1,14 @@
IMAGE_REPO=zammad/zammad-docker-compose
ELASTICSEARCH_VERSION=8.8.0
IMAGE_REPO=ghcr.io/zammad/zammad
MEMCACHE_SERVERS=zammad-memcached:11211
MEMCACHE_VERSION=1.6.20-alpine
POSTGRES_DB=zammad_production
POSTGRES_PASS=zammad
POSTGRES_USER=zammad
POSTGRES_HOST=zammad-postgresql
POSTGRES_PORT=5432
POSTGRES_VERSION=15.3-alpine
REDIS_URL=redis://zammad-redis:6379
REDIS_VERSION=7.0.5-alpine
RESTART=always
VERSION=5.3.0-2
VERSION=6.0.0-66

View File

@ -1,5 +1,5 @@
name-template: "$RESOLVED_VERSION"
tag-template: "$RESOLVED_VERSION"
name-template: "v$RESOLVED_VERSION"
tag-template: "v$RESOLVED_VERSION"
categories:
- title: "🚀 Features"
labels:
@ -33,3 +33,5 @@ template: |
## Changes
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION

16
.github/tests.sh vendored
View File

@ -23,16 +23,28 @@ echo
echo "Execute autowizard..."
echo
docker exec zammad-docker-compose_zammad-railsserver_1 rake zammad:setup:auto_wizard
docker exec --env=AUTOWIZARD_RELATIVE_PATH=var/auto_wizard.json --env=DATABASE_URL=postgres://zammad:zammad@zammad-postgresql:5432/zammad_production zammad-docker-compose_zammad-railsserver_1 rake zammad:setup:auto_wizard
echo
echo "Autowizard executed successful :)"
echo
echo
echo "Check DB for AutoWizard user"
echo
docker exec --env=DATABASE_URL=postgres://zammad:zammad@zammad-postgresql:5432/zammad_production zammad-docker-compose_zammad-railsserver_1 rails r "p User.find_by(email: 'info@zammad.org')" | grep 'info@zammad.org'
echo
echo "Check DB for AutoWizard user successfull :)"
echo
echo
echo "Fill DB with some random data"
docker exec zammad-docker-compose_zammad-railsserver_1 rails r "FillDb.load(agents: 1,customers: 1,groups: 1,organizations: 1,overviews: 1,tickets: 1)"
echo
docker exec --env=DATABASE_URL=postgres://zammad:zammad@zammad-postgresql:5432/zammad_production zammad-docker-compose_zammad-railsserver_1 rails r "FillDb.load(agents: 1,customers: 1,groups: 1,organizations: 1,overviews: 1,tickets: 1)"
echo
echo "DB fill successful :)"

View File

@ -19,7 +19,7 @@ jobs:
run: docker-compose up --detach
- name: add autowizard file
run: docker cp .github/auto_wizard.json zammad-docker-compose_zammad-railsserver_1:/opt/zammad
run: docker cp .github/auto_wizard.json zammad-docker-compose_zammad-railsserver_1:/opt/zammad/var
- name: run tests
run: .github/tests.sh

View File

@ -23,7 +23,7 @@ jobs:
fetch-depth: 0
- name: Lint Code Base
uses: github/super-linter/slim@v4
uses: github/super-linter/slim@v5
env:
DEFAULT_BRANCH: master
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -6,23 +6,24 @@ twitter, chat and emails. It is distributed under the GNU AFFERO General Public
License (AGPL). Do you receive many emails and want to answer them with a team of agents?
You're going to love Zammad!
## Use case for this repository
## Use cases
This repository is meant to be the starting point for somebody who likes to use dockerized multi-container Zammad in production.
This repository is the starting point if you want to:
## Getting started with zammad-docker-compose
- deploy Zammad in a containerized production environment
- test the current `stable` or `develop` versions of Zammad
[Learn more on Zammads documentation](https://docs.zammad.org/en/latest/install/docker-compose.html)
## Getting started
[Learn more on Zammads documentation](https://docs.zammad.org/en/latest/install/docker-compose.html)
## Upgrading
For upgrading instrcutions see our [Releases](https://github.com/zammad/zammad-docker-compose/releases).
Please be aware that the zammad-cocker-compose repository versions and tags don't match the Zammad container tags!
For upgrading instructions see our [Releases](https://github.com/zammad/zammad-docker-compose/releases).
## Status
[![ci-remote-image](https://github.com/zammad/zammad-docker-compose/actions/workflows/ci-remote-image.yaml/badge.svg)](https://github.com/zammad/zammad-docker-compose/actions/workflows/ci-remote-image.yaml) [![Docker Pulls](https://badgen.net/docker/pulls/zammad/zammad-docker-compose?icon=docker&label=pulls)](https://hub.docker.com/r/zammad/zammad-docker-compose/)
[![ci-remote-image](https://github.com/zammad/zammad-docker-compose/actions/workflows/ci-remote-image.yaml/badge.svg)](https://github.com/zammad/zammad-docker-compose/actions/workflows/ci-remote-image.yaml) [![Dockerhub Pulls](https://badgen.net/docker/pulls/zammad/zammad-docker-compose?icon=docker&label=pulls)](https://hub.docker.com/r/zammad/zammad-docker-compose/)
## Using a reverse proxy
@ -48,4 +49,4 @@ RANCHER_URL=http://RANCHER_HOST:8080 rancher-compose --env-file=.env up
Elasticsearch is an optional, but strongly recommended dependency for Zammad. More details can be found in the [documentation](https://docs.zammad.org/en/latest/prerequisites/software.html#elasticsearch-optional). There are however certain scenarios when running without Elasticsearch may be desired, e.g. for very small teams, for teams with limited budget or as a temporary solution for an unplanned Elasticsearch downtime or planned cluster upgrade.
Elasticsearch is enabled by default in the example `docker-compose.yml` file. It is also by default required to run the "zammad-init" command. Disabling Elasticsearch is possible by setting a special environment variable: `ELASTICSEARCH_ENABLED=false` for the `zammad-init` container and removing all references to Elasticsearch everywhere else: the `zammad-elasticsearch` container, it's volume and links to it.
Elasticsearch is enabled by default in the example `docker-compose.yml` file. It is also by default required to run the "zammad-init" command. Disabling Elasticsearch is possible by setting a special environment variable: `ELASTICSEARCH_ENABLED=false` for the `zammad-init` container and removing all references to Elasticsearch everywhere else: the `zammad-elasticsearch` container, its volume and links to it.

View File

@ -1,5 +1,5 @@
---
version: '3'
version: '3.8'
services:
@ -10,19 +10,21 @@ services:
- zammad-postgresql
entrypoint: /usr/local/bin/backup.sh
environment:
- BACKUP_SLEEP=86400
- BACKUP_TIME=03:00
- HOLD_DAYS=10
- POSTGRESQL_DB=${POSTGRES_DB}
- POSTGRESQL_USER=${POSTGRES_USER}
- POSTGRESQL_PASSWORD=${POSTGRES_PASS}
image: postgres:15.0-alpine
- TZ=Europe/Berlin
image: postgres:${POSTGRES_VERSION}
restart: ${RESTART}
volumes:
- zammad-backup:/var/tmp/zammad
- zammad-data:/opt/zammad:ro
- zammad-var:/opt/zammad/var:ro
- ./scripts/backup.sh:/usr/local/bin/backup.sh:ro
zammad-elasticsearch:
image: bitnami/elasticsearch:8.5.1
image: bitnami/elasticsearch:${ELASTICSEARCH_VERSION}
restart: ${RESTART}
volumes:
- elasticsearch-data:/bitnami/elasticsearch/data
@ -33,17 +35,17 @@ services:
- zammad-postgresql
environment:
- MEMCACHE_SERVERS=${MEMCACHE_SERVERS}
- POSTGRESQL_USER=${POSTGRES_USER}
- POSTGRESQL_PASS=${POSTGRES_PASS}
- REDIS_URL=${REDIS_URL}
image: ${IMAGE_REPO}:${VERSION}
restart: on-failure
user: 0:0
volumes:
- zammad-data:/opt/zammad
- zammad-config-nginx:/etc/nginx/sites-enabled
- zammad-var:/opt/zammad/var
zammad-memcached:
command: memcached -m 256M
image: memcached:1.6.17-alpine
image: memcached:${MEMCACHE_VERSION}
restart: ${RESTART}
zammad-nginx:
@ -55,13 +57,15 @@ services:
image: ${IMAGE_REPO}:${VERSION}
restart: ${RESTART}
volumes:
- zammad-data:/opt/zammad
- zammad-config-nginx:/etc/nginx/sites-enabled:ro
- zammad-var:/opt/zammad/var:ro
zammad-postgresql:
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASS}
image: postgres:15.1-alpine
image: postgres:${POSTGRES_VERSION}
restart: ${RESTART}
volumes:
- postgresql-data:/var/lib/postgresql/data
@ -78,11 +82,13 @@ services:
image: ${IMAGE_REPO}:${VERSION}
restart: ${RESTART}
volumes:
- zammad-data:/opt/zammad
- zammad-var:/opt/zammad/var
zammad-redis:
image: redis:7.0.5-alpine
image: redis:${REDIS_VERSION}
restart: ${RESTART}
volumes:
- redis-data:/data
zammad-scheduler:
command: ["zammad-scheduler"]
@ -96,7 +102,7 @@ services:
image: ${IMAGE_REPO}:${VERSION}
restart: ${RESTART}
volumes:
- zammad-data:/opt/zammad
- zammad-var:/opt/zammad/var
zammad-websocket:
command: ["zammad-websocket"]
@ -110,14 +116,18 @@ services:
image: ${IMAGE_REPO}:${VERSION}
restart: ${RESTART}
volumes:
- zammad-data:/opt/zammad
- zammad-var:/opt/zammad/var
volumes:
elasticsearch-data:
driver: local
postgresql-data:
driver: local
redis-data:
driver: local
zammad-backup:
driver: local
zammad-data:
zammad-config-nginx:
driver: local
zammad-var:
driver: local

View File

@ -2,7 +2,7 @@
set -e
: "${ZAMMAD_DIR:=/opt/zammad}"
: "${ZAMMAD_DIR:=/opt/zammad/var}"
: "${BACKUP_DIR:=/var/tmp/zammad}"
: "${ZAMMAD_RAILSSERVER_HOST:=zammad-railsserver}"
: "${ZAMMAD_RAILSSERVER_PORT:=3000}"
@ -11,7 +11,7 @@ set -e
: "${POSTGRESQL_DB:=zammad_production}"
function check_railsserver_available {
until (echo > /dev/tcp/${ZAMMAD_RAILSSERVER_HOST}/${ZAMMAD_RAILSSERVER_PORT}) &> /dev/null; do
until (echo > "/dev/tcp/$ZAMMAD_RAILSSERVER_HOST/$ZAMMAD_RAILSSERVER_PORT") &> /dev/null; do
echo "waiting for railsserver to be ready..."
sleep 60
done
@ -43,10 +43,15 @@ if [ "$1" = 'zammad-backup' ]; then
check_railsserver_available
while true; do
NOW_TIMESTAMP=$(date +%s)
TOMORROW_DATE=$(date -d@"$((NOW_TIMESTAMP + 24*60*60))" +%Y-%m-%d)
zammad_backup
# wait until next backup
sleep "${BACKUP_SLEEP}"
NEXT_TIMESTAMP=$(date -d "$TOMORROW_DATE $BACKUP_TIME" +%s)
NOW_TIMESTAMP=$(date +%s)
sleep $((NEXT_TIMESTAMP - NOW_TIMESTAMP))
done
fi