Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker image: need to manually enable app after installation #31

Open
Erikvv opened this issue Oct 27, 2022 · 2 comments
Open

Docker image: need to manually enable app after installation #31

Erikvv opened this issue Oct 27, 2022 · 2 comments

Comments

@Erikvv
Copy link
Contributor

Erikvv commented Oct 27, 2022

After going through the installation wizard I need to manually enable the Storj app in settings.

Perhaps this can be fixed by adding it to https://github.com/nextcloud/server/blob/master/core/shipped.json

@Erikvv Erikvv changed the title Docker image: need to enable app after installation Docker image: need to manually enable app after installation Oct 27, 2022
@ebirbe
Copy link

ebirbe commented May 23, 2023

I managed to install StorJ app as Primary Storage for Nextcloud thanks to your idea about adding it in the file shipped.json.

The app needs to be enabled during the Nextcloud installation to be used as primary storage, so, to enable it by default I added it to the shipped.json file using sed at the moment of building the custom image.

See my Dockerfile:

FROM nextcloud

# Install FFI dependencies
RUN set -ex; \
    apt-get update; \
    apt-get install -y --no-install-recommends \
        libffi-dev \
    && rm -rf /var/lib/apt/lists/*

# Enable php FFI extension
RUN set -ex; \
    docker-php-ext-install ffi \
    && echo ffi.enable=true > /usr/local/etc/php/conf.d/storj.ffi.ini

# Download Storj app
RUN set -ex; \
    mkdir -p /usr/src/nextcloud/apps \
    && cd /usr/src/nextcloud/apps \
    && curl --output storj.tar.gz https://link.storjshare.io/raw/jvfizc37vgr5ohyxwreg7abnxxrq/nextcloud-app-assets/storj-v0.0.9.tar.gz \
    && tar -x -f storj.tar.gz \
    && rm storj.tar.gz

# Enable StorJ app by default in Nextcloud
COPY storj.config.php /usr/src/nextcloud/config/storj.config.php
RUN set -ex; \
    sed -i '/"shippedApps": \[/a "storj",' /usr/src/nextcloud/core/shipped.json \
    && sed -i '/"defaultEnabled": \[/a "storj",' /usr/src/nextcloud/core/shipped.json

Obviously, you have to configure the credentials in your docker-compose.yml file:

[...]
  environment:
  [...]
      # StorJ
      - OBJECTSTORE_STORJ_BUCKET=testcloud
      - OBJECTSTORE_STORJ_ACCESS_GRANT=abCdAbcDabcD.........

Hope it helps.

BTW: I'm doing this in nextcloud 26.0.1 and it works pretty well.

Selección_idpd3_265

Selección_idpd3_266

👍

@chiaroscurosity
Copy link

@ebirbe Hello! I'm trying to build my own Dockerfile for Storj and Nextcloud but my knowledge on the process is novice. Is there a Youtube walkthrough of the steps? I would really like to get this going. Thanks for any information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants