This profile is from a federated server and may be incomplete. Browse more on the original instance.

sdw,

Where do y’all get your programming drama? I’m missing out

sdw,

Just want to say that I’ve been there. There was a time my Nextcloud install was incredibly slow. Fortunately (or unfortunately?), it is featureful enough and widely supported that once you figure this issue out, it is a nice service to keep running.

For me, adding Redis was essential. It doesn’t really make sense to me why (nothing I do on Nextcloud is intensive or data heavy) but it has greatly improved the performance of my app.

My entire setup is a containerized Nextcloud, Nextcloud Cron, MariaDB (if I knew Postgres was an option, I would’ve chosen that), and Redis:


<span style="color:#323232;">version: '2'
</span><span style="color:#323232;">services:
</span><span style="color:#323232;">  nextcloud:
</span><span style="color:#323232;">    container_name: nextcloud
</span><span style="color:#323232;">    image: nextcloud:27-apache
</span><span style="color:#323232;">    restart: unless-stopped
</span><span style="color:#323232;">    environment:
</span><span style="color:#323232;">      - MYSQL_PASSWORD=nextcloud
</span><span style="color:#323232;">      - MYSQL_HOST=db
</span><span style="color:#323232;">      - MYSQL_DATABASE=nextcloud
</span><span style="color:#323232;">      - MYSQL_USER=nextcloud
</span><span style="color:#323232;">    labels:
</span><span style="color:#323232;">      - 'public-service=true'
</span><span style="color:#323232;">      - 'traefik.enable=true'
</span><span style="color:#323232;">      - 'traefik.http.routers.cloud.rule=Host(`nextcloud.some.domain`)'
</span><span style="color:#323232;">      - 'traefik.http.routers.cloud.tls=true'
</span><span style="color:#323232;">      - 'traefik.http.services.cloud.loadbalancer.server.port=80'
</span><span style="color:#323232;">    volumes:
</span><span style="color:#323232;">      - /some/data/dir/nextcloud/data:/var/www/html
</span><span style="color:#323232;">      - /some/external/dir:/wew:ro
</span><span style="color:#323232;">
</span><span style="color:#323232;">  nextcloud-cron:
</span><span style="color:#323232;">    image: nextcloud:27-apache
</span><span style="color:#323232;">    restart: unless-stopped
</span><span style="color:#323232;">    command: [/cron.sh]
</span><span style="color:#323232;">    environment:
</span><span style="color:#323232;">      - MYSQL_HOST=db
</span><span style="color:#323232;">      - MYSQL_DATABASE=nextcloud
</span><span style="color:#323232;">      - MYSQL_USER=nextcloud
</span><span style="color:#323232;">      - MYSQL_PASSWORD=nextcloud
</span><span style="color:#323232;">    volumes:
</span><span style="color:#323232;">      - /some/data/dir/nextcloud/data:/var/www/html
</span><span style="color:#323232;">      - /some/external/dir/:/wew:ro
</span><span style="color:#323232;">
</span><span style="color:#323232;">  db:
</span><span style="color:#323232;">    image: mariadb:10.4
</span><span style="color:#323232;">    restart: unless-stopped
</span><span style="color:#323232;">    environment:
</span><span style="color:#323232;">      MYSQL_DATABASE: nextcloud
</span><span style="color:#323232;">      MYSQL_USER: nextcloud
</span><span style="color:#323232;">      MYSQL_ROOT_PASSWORD: nextcloud
</span><span style="color:#323232;">    volumes:
</span><span style="color:#323232;">      - /some/data/dir/nextcloud/db:/var/lib/mysql
</span><span style="color:#323232;">
</span><span style="color:#323232;">  mysqldump:
</span><span style="color:#323232;">    image: mariadb:10.4
</span><span style="color:#323232;">    depends_on: [db]
</span><span style="color:#323232;">    # restart: never # cronjob
</span><span style="color:#323232;">    labels:
</span><span style="color:#323232;">      - 'cron.schedule=0 0 8 * * ?'
</span><span style="color:#323232;">    entrypoint: [mysqldump, -h, db, -u, nextcloud, -pnextcloud, --all-databases, -r, /out/nextcloud.sql]
</span><span style="color:#323232;">    user: root
</span><span style="color:#323232;">    volumes:
</span><span style="color:#323232;">      - /some/data/dir/nextcloud/db-dump:/out
</span><span style="color:#323232;">
</span><span style="color:#323232;">  redis:
</span><span style="color:#323232;">    image: redis
</span><span style="color:#323232;">    restart: unless-stopped
</span>
sdw,

The separate cron container made the most sense to me. Other variants “work” but imo are mostly workarounds to avoid setting up a real cronjob. Beyond this I have no real reason, nor can I vouch that is is more or less performant than others.

Yes, the mysqldump container is for easier restores. It’s much easier to restore from a .sql file than a raw data dir that was copied while the DB was running ;) (speaking from experience…)

sdw,

I configured it in config.php directly, probably following docs.nextcloud.com/…/caching_configuration.html#i…


<span style="color:#323232;">  'memcache.local' => '\OC\Memcache\APCu',
</span><span style="color:#323232;">  'memcache.distributed' => '\OC\Memcache\Redis',
</span><span style="color:#323232;">  'memcache.locking' => '\OC\Memcache\Redis',
</span><span style="color:#323232;">  'redis' => 
</span><span style="color:#323232;">  array (
</span><span style="color:#323232;">    'host' => 'redis',
</span><span style="color:#323232;">    'port' => 6379,
</span><span style="color:#323232;">  ),
</span>
sdw,

Humanity has been enlightened by Flex Mex for at least ten years meow: youtu.be/GTwrVAbV56o

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • uselessserver093
  • Food
  • aaaaaaacccccccce
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • KamenRider
  • Ask_kbincafe
  • TheResearchGuardian
  • KbinCafe
  • Socialism
  • oklahoma
  • SuperSentai
  • feritale
  • All magazines