Skip to content

Extensions are lost on restart / upgrade #118

@Naros

Description

@Naros

Support guidelines

I've found a bug and checked that ...

  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

Our compose file specifically maps a persistent volume for the /data directory as outlined in the README.md; however, when we restart the container using docker-compose down followed by docker-compose up, all previously installed extensions we had added no longer show in the administration panel and require that we rerun the following for each package:

docker-compose exec flarum extension require <package>

Based on the README.md, this shouldn't be necessary, but creates a very rigid situation when the host OS needs to be restarted due to OS updates or when we need to update the base image to a later version.

Expected behaviour

Extensions should be retained and enabled across restarts.

Actual behaviour

Custom extensions no longer show in the administration panel across restarts.

Steps to reproduce

  1. Set up a simple flarum docker-compose configuration with MariaDB and Flarum, making sure that /data is persisted in the Flarum container and /var/lib/mysql in the MariaDB container.
  2. Login to flarum, go to the administration panel and see the extensions.
  3. Install any custom extension, i.e. docker compose exec flarum extension require askvortsov/flarum-markdown-tables
  4. Refresh administration panel, see the extension is listed.
  5. In a shell run docker-compose down followed by docker-compose up
  6. Refresh administration panel, see that the custom extension no longer is present.

Docker info

Client: Docker Engine - Community
 Version:    27.3.1
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.17.1
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.29.7
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 4
  Running: 2
  Paused: 0
  Stopped: 2
 Images: 4
 Server Version: 27.3.1
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 7f7fdf5fed64eb6a7caf99b3e12efcf9d60e311c
 runc version: v1.1.14-0-g2c9f560
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 5.15.0-124-generic
 Operating System: Ubuntu 22.04.5 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 8
 Total Memory: 31.03GiB
 Name: ns541399
 ID: 921ec8a7-2caf-4c4c-a301-aedc2aa6aab3
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled

Docker Compose config

version: "3"

services:
  flarum:
    image: crazymax/flarum:1.8.5
    container_name: flarum
    env_file:
      - ./flarum.env
    volumes:
      - ./data:/data
    ports:
      - 8888:8000
    depends_on:
      - mariadb

  mariadb:
    image: mariadb:10.5
    container_name: mariadb
    environment:
      - MYSQL_ROOT_PASSWORD=<password>
      - MYSQL_DATABASE=flarum
      - MYSQL_USER=flarum
      - MYSQL_PASSWORD=<password>
    volumes:
      - ./db:/var/lib/mysql

Logs

N/A

Additional info

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions