Skip to content

Commit c5c1db5

Browse files
authored
update zammad & components (#307)
Signed-off-by: André Bauer <[email protected]> Signed-off-by: André Bauer <[email protected]>
1 parent 0af24d7 commit c5c1db5

File tree

12 files changed

+71
-91
lines changed

12 files changed

+71
-91
lines changed

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ POSTGRES_USER=zammad
55
REDIS_URL=redis://zammad-redis:6379
66
RESTART=always
77
# don't forget to add the minus before the version
8-
VERSION=-5.2.3-18
8+
VERSION=-5.2.3-32

.github/dependabot.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,6 @@ updates:
88
time: "09:00"
99
timezone: "Europe/Berlin"
1010

11-
- package-ecosystem: "docker"
12-
directory: "/containers/zammad-elasticsearch"
13-
schedule:
14-
interval: "weekly"
15-
time: "09:00"
16-
timezone: "Europe/Berlin"
17-
18-
- package-ecosystem: "docker"
19-
directory: "/containers/zammad-postgresql"
20-
schedule:
21-
interval: "weekly"
22-
time: "09:00"
23-
timezone: "Europe/Berlin"
24-
2511
- package-ecosystem: "github-actions"
2612
directory: "/"
2713
schedule:

.github/docker-image-build.sh

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@
55
set -o errexit
66
set -o pipefail
77

8-
DOCKER_IMAGES="zammad zammad-elasticsearch zammad-postgresql"
8+
DOCKER_IMAGE="zammad"
99

10-
# shellcheck disable=SC2153
11-
for DOCKER_IMAGE in ${DOCKER_IMAGES}; do
12-
echo "Build Zammad Docker image ${DOCKER_IMAGE} for local or ci tests"
13-
docker build --pull --no-cache --build-arg BUILD_DATE="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" -t "${DOCKER_IMAGE}-local" -f "containers/${DOCKER_IMAGE}/Dockerfile" .
14-
done
10+
echo "Build Zammad Docker image ${DOCKER_IMAGE} for local or ci tests"
11+
docker build --pull --no-cache --build-arg BUILD_DATE="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" -t "${DOCKER_IMAGE}-local" -f "containers/${DOCKER_IMAGE}/Dockerfile" .

.github/workflows/ci-remote-image.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
jobs:
1010
run-remote-image-docker-compose:
1111
timeout-minutes: 20
12-
runs-on: ubuntu-20.04
12+
runs-on: ubuntu-22.04
1313
steps:
1414
- name: Checkout
1515
uses: actions/checkout@v3

.github/workflows/ci.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
jobs:
88
lint-docker-compose-file:
9-
runs-on: ubuntu-20.04
9+
runs-on: ubuntu-22.04
1010
steps:
1111
- name: Checkout
1212
uses: actions/checkout@v3
@@ -15,7 +15,7 @@ jobs:
1515
run: docker-compose config
1616

1717
super-linter:
18-
runs-on: ubuntu-20.04
18+
runs-on: ubuntu-22.04
1919
steps:
2020
- name: Checkout Code
2121
uses: actions/checkout@v3
@@ -36,7 +36,7 @@ jobs:
3636
- lint-docker-compose-file
3737
- super-linter
3838
timeout-minutes: 20
39-
runs-on: ubuntu-20.04
39+
runs-on: ubuntu-22.04
4040
steps:
4141
- name: Checkout
4242
uses: actions/checkout@v3

README.md

Lines changed: 53 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,59 @@ Elasticsearch is enabled by default in the example `docker-compose.yml` file. It
4646

4747
## Upgrading
4848

49+
### From =< to 5.0.0 to 5.2.3-32
50+
51+
* Elasticsearch was updated from 7.17.3 to 8.5.0 using the Bitnami image
52+
* We don't use a custom build of the docker image anymore as ingest-attachment is no longer a plugin but instead a module packaged with this distribution of Elasticsearch
53+
* ELASTICSEARCH_REINDEX var should be set to true
54+
55+
* PostgreSql was updated from 9.6.24 to 15.0.0
56+
* We don't use a custom build of the docker image anymore as we just mount the backup script to the postgres container now
57+
* backup / restore ins needed to update
58+
* you can create a new backup (with your old postgres 9.6 version / still in previous git version) by:
59+
* if you already have checked out the newest commit
60+
* `git checkout cd424e98689b8dc49878a37b9aab67192c36fd24`
61+
* docker-compose stop
62+
* docker-compose up
63+
* check docker logs until "backup finished :)" is shown as last(!) entry
64+
* `docker logs -f zammad-docker-compose_zammad-backup_1`
65+
* `docker-compose stop`
66+
* you can restore the backup in postgres 15 like
67+
* update git epository
68+
* `git checkout master`
69+
* `git pull`
70+
* stop docker-compose if it's running
71+
* `docker-compose stop`
72+
* delete old zammad postgre container and volume (data is lost! get sure your backups are in place!)
73+
* `docker container rm zammad-docker-compose_zammad-postgresql_1`
74+
* `docker volume rm zammad-docker-compose_postgresql-data`
75+
* recreate zammads postgres volume
76+
* `docker volume create zammad-docker-compose_postgresql-data`
77+
* start a temporary restore container (adjust username & password vars if needed)
78+
* `docker run -it --rm --name postgres-restore -v zammad-docker-compose_zammad-backup:/var/tmp/zammad:ro -v zammad-docker-compose_postgresql-data:/var/lib/postgresql/data -e POSTGRES_USER=zammad -e POSTGRES_PASSWORD=zammad postgres:15.0-alpine`
79+
* in a second bash shell run:
80+
* show available backups
81+
* `docker exec -it postgres-restore bash -c "ls -al /var/tmp/zammad/"`
82+
* create zammad_production db
83+
* `docker exec -it postgres-restore bash -c "psql -U zammad --command='CREATE DATABASE zammad_production'"`
84+
* restore old data with adjusted filename you got from the ls command above
85+
* `docker exec -it postgres-restore bash -c "gunzip -kc /var/tmp/zammad/!!!ENTER_PSQL_FILE_NAME_FROM_COMMAND_ABOVE!!!_zammad_db.psql.gz | psql -U zammad" -d zammad_production`
86+
* stop the restore container
87+
* `docker stop postgres-restore`
88+
* in your first bash shell
89+
* `docker-compose up`
90+
91+
### From =< 4.0.0 to 5.0.0
92+
93+
Memchached config changed. If you use the old env vars `MEMCACHED_HOST` & `MEMCACHED_PORT` adapt to `MEMCACHE_SERVERS`.
94+
Redis is a dependency for the Websocket server now.
95+
96+
### From =< 3.6.0-65
97+
98+
To be able to run Zammad container with an unprivileged user we had to change the port Nginx uses from 80 to 8080, so Zammad needs to be accessed via <http://localhost:8080> instead of <http://localhost> now!
99+
100+
This change will also affect you, if you use a reverse proxy, like Traefik or Haproxy, in front of Zammad as your reverse proxy configuration needs to be adapted to point to port 8080 now.
101+
49102
### From =< 3.3.0-12
50103

51104
We've updated the Elasticsearch image from 5.6 to 7.6.
@@ -69,14 +122,3 @@ CREATE USER zammad;
69122
ALTER USER zammad WITH PASSWORD 'zammad';
70123
ALTER USER zammad WITH SUPERUSER CREATEDB;
71124
```
72-
73-
### From =< 3.6.0-65
74-
75-
To be able to run Zammad container with an unprivileged user we had to change the port Nginx uses from 80 to 8080, so Zammad needs to be accessed via <http://localhost:8080> instead of <http://localhost> now!
76-
77-
This change will also affect you, if you use a reverse proxy, like Traefik or Haproxy, in front of Zammad as your reverse proxy configuration needs to be adapted to point to port 8080 now.
78-
79-
### From =< 4.0.0 to 5.0.0
80-
81-
Memchached config changed. If you use the old env vars `MEMCACHED_HOST` & `MEMCACHED_PORT` adapt to `MEMCACHE_SERVERS`.
82-
Redis is a dependency for the Websocket server now.

containers/zammad-elasticsearch/Dockerfile

Lines changed: 0 additions & 17 deletions
This file was deleted.

containers/zammad-postgresql/Dockerfile

Lines changed: 0 additions & 20 deletions
This file was deleted.

containers/zammad/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ LABEL org.label-schema.build-date="$BUILD_DATE" \
3737
org.label-schema.vcs-url="https://github.com/zammad/zammad" \
3838
org.label-schema.vcs-type="Git" \
3939
org.label-schema.vendor="Zammad" \
40-
org.label-schema.schema-version="5.2.1" \
40+
org.label-schema.schema-version="5.2.3" \
4141
org.label-schema.docker.cmd="sysctl -w vm.max_map_count=262144;docker-compose up"
4242

4343
ENV GIT_BRANCH stable

docker-compose.override-local.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,12 @@ version: '3'
33

44
services:
55

6-
zammad-backup:
7-
image: zammad-postgresql-local
8-
9-
zammad-elasticsearch:
10-
image: zammad-elasticsearch-local
11-
126
zammad-init:
137
image: zammad-local
148

159
zammad-nginx:
1610
image: zammad-local
1711

18-
zammad-postgresql:
19-
image: zammad-postgresql-local
20-
2112
zammad-railsserver:
2213
image: zammad-local
2314

0 commit comments

Comments
 (0)