Index by title

Content


How to setup an development setup with NC hub (docker based)

Goal

Context

Steps

# Change to directory and create custom apps subdirectory
cd $NC_PATH
mkdir -p development/custom_apps

# Clone all needed apps
git clone git@github.com:nextcloud/integration_openproject.git
git clone git@github.com:nextcloud/user_oidc.git
git clone git@github.com:H2CK/oidc.git
# Change into app directory
cd $NC_PATH/development/custom_apps/integration_openproject

# Run build in node container
docker run -it --rm -v "$(pwd):$(pwd)" -w "$(pwd)" node:22-alpine npm ci
docker run -it --rm -v "$(pwd):$(pwd)" -w "$(pwd)" node:22-alpine npm ci
FROM composer:2
LABEL authors="openproject"

COPY --from=node:22-alpine /usr/local/bin /usr/local/bin
COPY --from=node:22-alpine /usr/local/lib/node_modules/npm /usr/local/lib/node_modules/npm

RUN npm install -g webpack@5.98.0
RUN npm install -g webpack-cli@6.0.1

RUN apk add rsync
# Change into app directory
cd $NC_PATH/development/custom_apps/oidc

# Ensure you have built the builder image
# Run build in nextcloud_app_builder
docker run -it --rm -v "$(pwd):$(pwd)" -w "$(pwd)" nextcloud_app_builder make composer
docker run -it --rm -v "$(pwd):$(pwd)" -w "$(pwd)" nextcloud_app_builder make build
# Change into app directory
cd $NC_PATH/development/custom_apps/user_oidc

# Ensure you have built the builder image
# Run build in nextcloud_app_builder
docker run -it --rm -v "$(pwd):$(pwd)" -w "$(pwd)" nextcloud_app_builder composer install --no-dev -o
docker run -it --rm -v "$(pwd):$(pwd)" -w "$(pwd)" nextcloud_app_builder npm ci
docker run -it --rm -v "$(pwd):$(pwd)" -w "$(pwd)" nextcloud_app_builder npm run build
# Change into custom apps directory
cd $NC_PATH/development/custom_apps

# Run build in nextcloud_app_builder
sudo chgrp www-data . -R
sudo chmod g+w . -R
# Change into integration app directory
cd $NC_PATH/development/custom_apps/integration_openproject

# Up the stack
docker compose up -d

# Initialize the instance, which can be done usually by
# opening the instance in the browser

# Configure the instance with occ
docker compose exec --user www-data nextcloud php occ config:system:set allow_local_remote_servers --value 1
docker compose exec --user www-data nextcloud php occ security:certificates:import /etc/ssl/certs/ca-certificates.crt

# Enable all apps
docker compose exec --user www-data nextcloud php occ a:e integration_openproject
docker compose exec --user www-data nextcloud php occ a:e user_oidc
docker compose exec --user www-data nextcloud php occ a:e oidc


The developer wiki for the ❌AUI project ...