nextcloud / docker

⛴ Docker image of Nextcloud
https://hub.docker.com/_/nextcloud/
GNU Affero General Public License v3.0
5.92k stars 1.82k forks source link

custom_apps not persistent #1633

Closed ghost closed 1 year ago

ghost commented 2 years ago

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:
eingemaischt commented 2 years ago

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 commented 2 years ago

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...

J0WI commented 1 year ago

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