#!/bin/bash # fail if any command returns error set -e set -x # wait 5 seconds to make sure all services have finished starting up sleep 5 # make database for nextcloud db-make # install nextcloud nc-occ maintenance:install --data-dir "/vol/files" --database "pgsql" --database-host "/var/run/postgresql" --database-name "$DBNAME" --database-user "$DBUSER" --database-pass "" --admin-user "admin" --admin-pass "admin" # do post-installation steps nc-occ maintenance:update:htaccess nc-occ db:add-missing-indices nc-occ db:add-missing-columns nc-occ db:convert-filecache-bigint # install extra apps we want nc-occ app:install calendar nc-occ app:install contacts nc-occ app:install notes nc-occ app:install bookmarks nc-occ app:install mail # disable apps we don't want nc-occ app:disable comments dashboard federation files_trashbin firstrunwizard recommendations support survey_client systemtags # configure apps # set calendar to refresh subscriptions once a day (to set to one hour use 'PT1H' instead) nc-occ config:app:set dav calendarSubscriptionRefreshRate --value P1D