Compare commits
1 Commits
master
...
monotek-pa
Author | SHA1 | Date | |
---|---|---|---|
|
842ea09096 |
11
.env
11
.env
@ -1,14 +1,7 @@
|
||||
ELASTICSEARCH_VERSION=8.8.0
|
||||
IMAGE_REPO=ghcr.io/zammad/zammad
|
||||
IMAGE_REPO=zammad/zammad-docker-compose
|
||||
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=6.0.0-66
|
||||
VERSION=5.3.0-2
|
||||
|
6
.github/release-drafter.yml
vendored
6
.github/release-drafter.yml
vendored
@ -1,5 +1,5 @@
|
||||
name-template: "v$RESOLVED_VERSION"
|
||||
tag-template: "v$RESOLVED_VERSION"
|
||||
name-template: "$RESOLVED_VERSION"
|
||||
tag-template: "$RESOLVED_VERSION"
|
||||
categories:
|
||||
- title: "🚀 Features"
|
||||
labels:
|
||||
@ -33,5 +33,3 @@ template: |
|
||||
## Changes
|
||||
|
||||
$CHANGES
|
||||
|
||||
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
|
||||
|
16
.github/tests.sh
vendored
16
.github/tests.sh
vendored
@ -23,28 +23,16 @@ echo
|
||||
echo "Execute autowizard..."
|
||||
echo
|
||||
|
||||
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
|
||||
docker exec 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"
|
||||
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)"
|
||||
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
|
||||
echo "DB fill successful :)"
|
||||
|
2
.github/workflows/ci-remote-image.yaml
vendored
2
.github/workflows/ci-remote-image.yaml
vendored
@ -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/var
|
||||
run: docker cp .github/auto_wizard.json zammad-docker-compose_zammad-railsserver_1:/opt/zammad
|
||||
|
||||
- name: run tests
|
||||
run: .github/tests.sh
|
||||
|
2
.github/workflows/ci.yaml
vendored
2
.github/workflows/ci.yaml
vendored
@ -23,7 +23,7 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Lint Code Base
|
||||
uses: github/super-linter/slim@v5
|
||||
uses: github/super-linter/slim@v4
|
||||
env:
|
||||
DEFAULT_BRANCH: master
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
19
README.md
19
README.md
@ -6,24 +6,23 @@ 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 cases
|
||||
## Use case for this repository
|
||||
|
||||
This repository is the starting point if you want to:
|
||||
This repository is meant to be the starting point for somebody who likes to use dockerized multi-container Zammad in production.
|
||||
|
||||
- deploy Zammad in a containerized production environment
|
||||
- test the current `stable` or `develop` versions of Zammad
|
||||
## Getting started with zammad-docker-compose
|
||||
|
||||
## Getting started
|
||||
|
||||
[Learn more on Zammad’s documentation](https://docs.zammad.org/en/latest/install/docker-compose.html)
|
||||
[Learn more on Zammads documentation](https://docs.zammad.org/en/latest/install/docker-compose.html)
|
||||
|
||||
## Upgrading
|
||||
|
||||
For upgrading instructions see our [Releases](https://github.com/zammad/zammad-docker-compose/releases).
|
||||
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!
|
||||
|
||||
## 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) [![Dockerhub 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) [![Docker 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
|
||||
|
||||
@ -49,4 +48,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, its 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, it's volume and links to it.
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
version: '3.8'
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
|
||||
@ -10,21 +10,19 @@ services:
|
||||
- zammad-postgresql
|
||||
entrypoint: /usr/local/bin/backup.sh
|
||||
environment:
|
||||
- BACKUP_TIME=03:00
|
||||
- BACKUP_SLEEP=86400
|
||||
- HOLD_DAYS=10
|
||||
- POSTGRESQL_DB=${POSTGRES_DB}
|
||||
- POSTGRESQL_USER=${POSTGRES_USER}
|
||||
- POSTGRESQL_PASSWORD=${POSTGRES_PASS}
|
||||
- TZ=Europe/Berlin
|
||||
image: postgres:${POSTGRES_VERSION}
|
||||
image: postgres:15.0-alpine
|
||||
restart: ${RESTART}
|
||||
volumes:
|
||||
- zammad-backup:/var/tmp/zammad
|
||||
- zammad-var:/opt/zammad/var:ro
|
||||
- zammad-data:/opt/zammad:ro
|
||||
- ./scripts/backup.sh:/usr/local/bin/backup.sh:ro
|
||||
|
||||
zammad-elasticsearch:
|
||||
image: bitnami/elasticsearch:${ELASTICSEARCH_VERSION}
|
||||
image: bitnami/elasticsearch:8.5.1
|
||||
restart: ${RESTART}
|
||||
volumes:
|
||||
- elasticsearch-data:/bitnami/elasticsearch/data
|
||||
@ -35,17 +33,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-config-nginx:/etc/nginx/sites-enabled
|
||||
- zammad-var:/opt/zammad/var
|
||||
- zammad-data:/opt/zammad
|
||||
|
||||
zammad-memcached:
|
||||
command: memcached -m 256M
|
||||
image: memcached:${MEMCACHE_VERSION}
|
||||
image: memcached:1.6.17-alpine
|
||||
restart: ${RESTART}
|
||||
|
||||
zammad-nginx:
|
||||
@ -57,15 +55,13 @@ services:
|
||||
image: ${IMAGE_REPO}:${VERSION}
|
||||
restart: ${RESTART}
|
||||
volumes:
|
||||
- zammad-config-nginx:/etc/nginx/sites-enabled:ro
|
||||
- zammad-var:/opt/zammad/var:ro
|
||||
- zammad-data:/opt/zammad
|
||||
|
||||
zammad-postgresql:
|
||||
environment:
|
||||
- POSTGRES_DB=${POSTGRES_DB}
|
||||
- POSTGRES_USER=${POSTGRES_USER}
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASS}
|
||||
image: postgres:${POSTGRES_VERSION}
|
||||
image: postgres:15.1-alpine
|
||||
restart: ${RESTART}
|
||||
volumes:
|
||||
- postgresql-data:/var/lib/postgresql/data
|
||||
@ -82,13 +78,11 @@ services:
|
||||
image: ${IMAGE_REPO}:${VERSION}
|
||||
restart: ${RESTART}
|
||||
volumes:
|
||||
- zammad-var:/opt/zammad/var
|
||||
- zammad-data:/opt/zammad
|
||||
|
||||
zammad-redis:
|
||||
image: redis:${REDIS_VERSION}
|
||||
image: redis:7.0.5-alpine
|
||||
restart: ${RESTART}
|
||||
volumes:
|
||||
- redis-data:/data
|
||||
|
||||
zammad-scheduler:
|
||||
command: ["zammad-scheduler"]
|
||||
@ -102,7 +96,7 @@ services:
|
||||
image: ${IMAGE_REPO}:${VERSION}
|
||||
restart: ${RESTART}
|
||||
volumes:
|
||||
- zammad-var:/opt/zammad/var
|
||||
- zammad-data:/opt/zammad
|
||||
|
||||
zammad-websocket:
|
||||
command: ["zammad-websocket"]
|
||||
@ -116,18 +110,14 @@ services:
|
||||
image: ${IMAGE_REPO}:${VERSION}
|
||||
restart: ${RESTART}
|
||||
volumes:
|
||||
- zammad-var:/opt/zammad/var
|
||||
- zammad-data:/opt/zammad
|
||||
|
||||
volumes:
|
||||
elasticsearch-data:
|
||||
driver: local
|
||||
postgresql-data:
|
||||
driver: local
|
||||
redis-data:
|
||||
driver: local
|
||||
zammad-backup:
|
||||
driver: local
|
||||
zammad-config-nginx:
|
||||
driver: local
|
||||
zammad-var:
|
||||
zammad-data:
|
||||
driver: local
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
set -e
|
||||
|
||||
: "${ZAMMAD_DIR:=/opt/zammad/var}"
|
||||
: "${ZAMMAD_DIR:=/opt/zammad}"
|
||||
: "${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,15 +43,10 @@ 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
|
||||
|
||||
NEXT_TIMESTAMP=$(date -d "$TOMORROW_DATE $BACKUP_TIME" +%s)
|
||||
NOW_TIMESTAMP=$(date +%s)
|
||||
|
||||
sleep $((NEXT_TIMESTAMP - NOW_TIMESTAMP))
|
||||
# wait until next backup
|
||||
sleep "${BACKUP_SLEEP}"
|
||||
done
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user