docker icon indicating copy to clipboard operation
docker copied to clipboard

custom_apps not persistent

Open ghost opened this issue 4 years ago • 2 comments

I have a docker-compose.yml file setup to bring my Nextcloud service up, and it works really well except for persistent apps.

I've mounted /var/www/html/custom_apps to an external folder as per the documentation, but it always remains empty and whenever I bring the container down and back up, all the apps are gone (they're still "enabled" in the app store, and re-enabling them brings them back with previous configuration).

Example: I enable Breeze Dark and it works correctly. Then I restart the container and it's no longer there.

docker-compose.yml for reference:

version: '3'

services:

  db:
    image: mariadb:10.5
    container_name: nextcloud-db
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    networks:
      - nextcloud
    volumes:
      - ../database:/var/lib/mysql
      - /etc/localtime:/etc/localtime:ro
    environment:
      - MYSQL_ROOT_PASSWORD=12345
      - MYSQL_USER=nextcloud
      - MYSQL_PASSWORD=67890
      - MYSQL_DATABASE=nextcloud
    restart: always

  redis:
    image: redis:latest
    container_name: nextcloud-redis
    restart: always
    networks:
      - nextcloud
    volumes:
      - redis:/var/lib/redis

  app:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: nextcloud-app
    networks:
      - nextcloud
    depends_on:
      - db
      - redis
    ports:
      - 1081:80
    volumes:
      - nextcloud:/var/www/html
      - ../config:/var/www/html/config
      - ../apps:/var/www/html/custom_apps
      - ../data:/var/www/html/data
      - ../themes:/var/www/html/themes
      - /etc/localtime:/etc/localtime:ro
    environment:
      - REDIS_HOST=redis
      - NEXTCLOUD_TRUSTED_DOMAINS=cloud.domain.uk
    restart: always

volumes:
  app:
  db:
  nextcloud:
  redis:

networks:
  nextcloud:

ghost avatar Nov 15 '21 09:11 ghost

I have the same problem - even with apps like contacts and calender.

I migrated an "normally" installed nextcloud to docker, but I also tried to delete the app folder once. How can I persist the apps?

Reenabling them after every update is not really practical...

eingemaischt avatar May 31 '22 20:05 eingemaischt

The interesting thing is: For example calender ist not shown in the top bar - only after I navigate to apps, I can deactivate and then download and activate it - after that it is shown in the top bar until the next upgrade...

eingemaischt avatar May 31 '22 20:05 eingemaischt

Note added in https://github.com/nextcloud/docker/pull/1862

J0WI avatar Apr 04 '23 18:04 J0WI