Intermesh / docker-groupoffice

Docker image for Group-Office groupware
https://www.group-office.com
MIT License
24 stars 14 forks source link

Groupoffice does not upgrade #4

Closed julyusito closed 3 years ago

julyusito commented 3 years ago

Hello,

I have the 6.4.206 version then I perform the upgrade steps, but the version remains the same after that.

This is my docker yml file, I set variables in environment files, the user and password are different from default:



services:

  db:
    image: mariadb
    hostname: go_db
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    env_file: /share/DockerVolumes/go/groupoffice-db.env
    networks:
      - internal 
    deploy:
      resources:
        limits:
          cpus: '1.0'
          memory: 1024M
      restart_policy:
        condition: on-failure
    volumes:
      - /share/DockerVolumes/go/groupoffice-db/var/lib/mysql:/var/lib/mysql:cached
      - /etc/localtime:/etc/localtime:ro
    restart: unless-stopped

  db_backup:
    image: mariadb
    hostname: go_db_backup
    env_file: /share/DockerVolumes/go/groupoffice-db-backup.env
    deploy:
      resources:
        limits:
          cpus: '0.5'
          memory: 384M
      restart_policy:
        condition: on-failure
    depends_on:
      - db
    volumes:
      - /share/DockerVolumes/go/groupoffice-db/database-dump:/dump
      - /etc/localtime:/etc/localtime:ro
    entrypoint: |
      bash -c 'bash -s <<EOF
      trap "break;exit" SIGHUP SIGINT SIGTERM
      sleep 2m
      while /bin/true; do
        mysqldump -h db --all-databases | gzip -c > /dump/dump_\`date +%d-%m-%Y"_"%H_%M_%S\`.sql.gz
        (ls -t /dump/dump*.sql.gz|head -n $$BACKUP_NUM_KEEP;ls /dump/dump*.sql.gz)|sort|uniq -u|xargs rm -- {}
        sleep $$BACKUP_FREQUENCY
      done
      EOF'
    networks:
    - internal 

  apps:
    image: intermesh/groupoffice:latest
    hostname: groupoffice
    env_file: /share/DockerVolumes/go/groupoffice-apps.env
    networks:
      - internal 
      - go_external 
    deploy:
      resources:
        limits:
          cpus: '2.0'
          memory: 4096M
      restart_policy:
        condition: on-failure
    depends_on:
      - db
      - db_backup
    ports:
      - 192.168.1.3:10112:80
      - 192.168.1.3:10113:443
    volumes:
      - /share/DockerVolumes/go/groupoffice/data:/var/lib/groupoffice:cached
      - /share/DockerVolumes/go/groupoffice/www:/usr/local/share/groupoffice
      - /share/DockerVolumes/go/groupoffice/etc/groupoffice:/etc/groupoffice:cached
      - /share/DockerVolumes/go/groupoffice/certs:/etc/ssl/groupoffice
    restart: unless-stopped

  cron:
    image: intermesh/groupoffice:latest
    hostname: go_cron
    deploy:
      resources:
        limits:
          cpus: '0.5'
          memory: 256M
      update_config:
        delay: 15s
      restart_policy:
        condition: on-failure
    depends_on:
      - apps
    volumes:
      - /share/DockerVolumes/go/groupoffice/data:/var/lib/groupoffice
      - /share/DockerVolumes/go/groupoffice/www:/usr/local/share/groupoffice
    user: www-data
    networks:
      - internal 
    entrypoint: |
      bash -c 'bash -s <<EOF
        trap "break;exit" SIGHUP SIGINT SIGTERM
        while [ ! -f /usr/local/share/groupoffice/config.php ]; do
          sleep 1
        done
        while true; do
          php /usr/local/share/groupoffice/cron.php /usr/local/share/groupoffice/config.php
          sleep 1m
        done
      EOF'

networks:
  go_external :
    external: true
  internal :
    driver: bridge
    ipam:
      config:
        - subnet: 192.168.6.0/24```

Thanks
mschering commented 3 years ago

Did you use docker-compose down or stop? If you stop them you'll have to remove the containers with docker-compose rm.

julyusito commented 2 years ago

Hi,

This is the error when upgrade the container:

cd /usr/local/share/groupoffice/ php cli.php core/System/upgrade

Error in /usr/local/share/groupoffice/go/core/db/Connection.php at line 50: Undefined class constant 'MYSQL_ATTR_USE_BUFFERED_QUERY' at 2022-03-31T22:01:53+00:00

julyusito commented 2 years ago

php -i | grep pdo

Configure Command => './configure' '--build=x86_64-linux-gnu' '--with-config-file-path=/usr/local/etc/php' '--with-config-file-scan-dir=/usr/local/etc/php/conf.d' '--enable-option-checking=fatal' '--with-mhash' '--with-pic' '--enable-ftp' '--enable-mbstring' '--enable-mysqlnd' '--with-password-argon2' '--with-sodium=shared' '--with-pdo-sqlite=/usr' '--with-sqlite3=/usr' '--with-curl' '--with-openssl' '--with-readline' '--with-zlib' '--with-pear' '--with-libdir=lib/x86_64-linux-gnu' '--with-apxs2' '--disable-cgi' 'build_alias=x86_64-linux-gnu' /usr/local/etc/php/conf.d/docker-php-ext-pdo_mysql.ini, API Extensions => mysqli,pdo_mysql pdo_mysql pdo_mysql.default_socket => no value => no value pdo_sqlite

julyusito commented 2 years ago

php -i|grep PDO

PDO PDO support => enabled PDO drivers => sqlite, mysql PDO Driver for MySQL => enabled PDO Driver for SQLite 3.x => enabled

julyusito commented 2 years ago

Like root: root@goprod:/var/www/html# php -m [PHP Modules] apcu bcmath calendar Core ctype curl date dom fileinfo filter ftp gd hash iconv intl ionCube Loader json ldap libxml mbstring memcached mysqli mysqlnd openssl pcntl pcre PDO pdo_mysql pdo_sqlite Phar posix readline Reflection session SimpleXML soap sodium SPL sqlite3 standard sysvmsg sysvsem sysvshm tokenizer xml xmlreader xmlwriter Zend OPcache zip zlib

[Zend Modules] Zend OPcache the ionCube PHP Loader + ionCube24

julyusito commented 2 years ago

Like www-data there is no pdo_mysql module: www-data@goprod:~/html$ php -m [PHP Modules] Core ctype curl date dom fileinfo filter ftp hash iconv json libxml mbstring mysqlnd openssl pcre PDO pdo_sqlite Phar posix readline Reflection session SimpleXML SPL sqlite3 standard tokenizer xml xmlreader xmlwriter zlib

[Zend Modules]

mschering commented 2 years ago

That's odd, I run the same image and when I do the same as www-data I have the same modules as root.

docker-groupoffice-development git:(master) ✗ docker-compose exec -u www-data groupoffice bash www-data@d5874e19278e:/usr/local/share/src$ php -m [PHP Modules] apcu bcmath calendar Core ctype curl date dom fileinfo filter ftp gd hash iconv intl ionCube Loader json ldap libxml mbstring memcached mysqlnd openssl pcntl pcre PDO pdo_mysql pdo_sqlite Phar posix readline Reflection session SimpleXML soap sodium SPL sqlite3 standard sysvmsg sysvsem sysvshm tokenizer xdebug xml xmlreader xmlwriter Zend OPcache zip zlib

[Zend Modules] Xdebug Zend OPcache the ionCube PHP Loader + ionCube24

www-data@d5874e19278e:/usr/local/share/src$