zammad / zammad-docker-compose

Zammad Docker images for docker-compose
https://hub.docker.com/r/zammad/zammad-docker-compose/
GNU Affero General Public License v3.0
268 stars 207 forks source link

zammad-backup fails with permission error on docker-compose up -d #382

Closed seljuck closed 10 months ago

seljuck commented 10 months ago

Infos

Expected behavior

Actual behavior

Steps to reproduce the behavior

mgruner commented 10 months ago

Hello @seljuck, thanks for your report.

Can you help me to reproduce this, please? It does work as expected here on Docker/MacOS.

Do you use the standard docker compose files / container images? Is there the expected mount of /usr/local/bin/backup.sh for the zammad-backup container? Can you share your .env as well, please (without credentials, of course)?

seljuck commented 10 months ago

I am using the standard compose files. But I did not use git to grab them. I just copied them. Also, I modified docker-compose.override.yml to include our nginx reverse proxy network.

Here's the zammad-backup section in docker-compose.yml

zammad-backup: command: ["zammad-backup"] depends_on:

Here is my .env file

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=password 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.1.0

mgruner commented 10 months ago

Just as a quick workaround, you can add this in a local override file to disable the backup container:

  zammad-backup:
    profiles:
      - disable-service  
mgruner commented 10 months ago

I just tried starting the default Zammad stack via docker compose on a fresh Ubuntu 20.04 cloud server, using the latest docker packages from the official apt repository, and it worked just fine.

Docker version 24.0.7, build afdd53b
containerd containerd.io 1.6.24 61f9fd88f79f081d64d6fa3bb1a0dc71ec870523
runc version 1.1.9
commit: v1.1.9-0-gccaecfc
spec: 1.0.2-dev
go: go1.20.8
libseccomp: 2.5.1

Right now this does not look like a defect in Zammad's stack, therefore I'm going to close this entry. Please feel free to provide more information that makes it reproducible for us.

seljuck commented 10 months ago

Thanks for your help @mgruner. I've solved the problem.

Because I copied the files, the scripts/backup.sh file did not have the execute permission. Once I did chmod +x backup.sh and started up the containers again, everything worked just fine.

seljuck commented 10 months ago

One other thought. The Zammad Docker Install documentation says you can just copy the files. This issue might want to be mentioned.

https://docs.zammad.org/en/latest/install/docker-compose.html

image

mgruner commented 10 months ago

Thanks for the follow-up. I will address this in the documentation.