diff --git a/nextcloud/docker-compose.yml b/nextcloud/docker-compose.yml index 1b22e32..17ed82c 100644 --- a/nextcloud/docker-compose.yml +++ b/nextcloud/docker-compose.yml @@ -1,9 +1,7 @@ -version: '3.5' - networks: default: - external: - name: traefik_default + name: traefik_default + external: true services: nextcloud-db: @@ -43,9 +41,12 @@ services: - nextcloud-db - nextcloud-redis container_name: nextcloud-app + command: > + bash -c 'chown -R www-data:www-data ${NEXTCLOUD_DATA_DIR} && chown -R www-data:www-data /var/www/html && chmod 755 ${NEXTCLOUD_DATA_DIR}/.ocdata && /entrypoint.sh apache2-foreground' env_file: live.env environment: - NEXTCLOUD_TRUSTED_DOMAINS='${NEXTCLOUD_FQDN}' + - NEXTCLOUD_DATA_DIR='${NEXTCLOUD_DATA_DIR}' extra_hosts: - "${NEXTCLOUD_FQDN}:${TRAEFIK_CONTAINER_IP}" - "${COLLABORA_FQDN}:${TRAEFIK_CONTAINER_IP}" @@ -77,17 +78,19 @@ services: restart: unless-stopped volumes: - ${NEXTCLOUD_ROOT}/html:/var/www/html - - ${NEXTCLOUD_ROOT}/data:/srv/nextcloud/data + - ${NEXTCLOUD_ROOT}/data:${NEXTCLOUD_DATA_DIR} nextcloud-cron: image: nextcloud:28 container_name: nextcloud-cron + command: > + bash -c 'chown -R www-data:www-data ${NEXTCLOUD_DATA_DIR} && chown -R www-data:www-data /var/www/html && chmod 755 ${NEXTCLOUD_DATA_DIR}/.ocdata && /entrypoint.sh apache2-foreground' labels: - "com.centurylinklabs.watchtower.enable=true" restart: unless-stopped volumes: - ${NEXTCLOUD_ROOT}/html:/var/www/html - - ${NEXTCLOUD_ROOT}/data:/srv/nextcloud/data + - ${NEXTCLOUD_ROOT}/data:${NEXTCLOUD_DATA_DIR} entrypoint: /cron.sh depends_on: - nextcloud-db