-
Notifications
You must be signed in to change notification settings - Fork 2
Local Development Setup
This will walk you through the process of setting up a local, Nextcloud-integrated development setup for RDS-NG.
Some hints:
- The Frontend hot reloads, the (python) backend doesn't. If you change Python code, you'll have to restart the
make dev-run.
make directories
mkdir Nextcloud
mkdir Nextcloud/custom_apps
mkdir nextcloud
Clone the NC App:
git clone https://github.com/Sciebo-RDS/rds-ng-nextcloud.gitClone RDS-ng next to it
git clone https://github.com/Sciebo-RDS/rds-ng.gityou should have the following structure:
/
/nextcloud.sh
/rds-ng (repo)
/rds-ng-nextcloud (repo)
/Nextcloud/custom_apps (empty)
/nextcloud (empty)
Replace the curly brackets and run the following nextcloud.sh script:
#!/bin/bash
docker stop nextcloud
docker rm -f nextcloud
docker run -d -p 8080:80 \
--name nextcloud \
-e NEXTCLOUD_ADMIN_USER=admin \
-e NEXTCLOUD_ADMIN_PASSWORD=admin \
-v nextcloud:/var/www/html \
-v {PATH TO}/Nextcloud/custom_apps:/var/www/html/custom_apps \
-v {PATH TO}/rds-ng-nextcloud:/var/www/html/custom_apps/rdsng \
nextcloud:29
docker exec -w /var/www/html/custom_apps/rdsng nextcloud make build
docker exec -u 33 nextcloud /var/www/html/occ config:system:set trusted_domains 10 --value={YOURIP}
docker exec -u 33 nextcloud /var/www/html/occ config:system:set overwritehost --value={YOURIP}:8080
Fix apps folder permissions:
(inside NC Container)
chown -R www-data:www-data custom_apps/
-
Go to
localhost:8080, login with admin/admin or register new admin account -
In the NC Menu, go to Apps/Disabled Apps, enable RDS-ng
-
Go to Settings/Security, add new OAUTH Client (don't lose the Client Secret!).
- Redirect URL:
http://localhost:8080/apps/rdsng/main
- Redirect URL:
-
Go to Administration Settings -> RDS NG, set RDS NG URL to
http://localhost:8000
- copy example env files, create
rds-ng/.datadirectory (holds the sqlite database as long as you use sqlite instead of mysql for RDS-ng)
cp rds-ng/deployment/containers/env/examples/* rds-ng/deployment/containers/env
-
Set ClientID and Secret that you got when registering the OAUTH Client to Nextcloud. (
dev.server.env,dev.frontend.envetc)-
RDS_AUTHORIZATION_OAUTH2_CLIENT_IDindev.frontend.env -
RDS_AUTHORIZATION_OAUTH2_SECRETS_HOSTindev.server.env - in
dev.frontend.env:RDS_INTEGRATION_DEFAULT_ROOT_PATHshould be commented out - -> (Repository secrets/client IDs are set in the corresponding
dev.{repository}.envfiles. To use these, you will have to register accounts attest.osf.ioandsandbox.zenodo.organd create OAUTH Apps with them)
-
-
Enter deployment directory
cd rds-ng/deployment/containers- run dev-environment
make dev-run- Open the RDS App from NC.
Warning
You have to use localhost:8080, your local IP won't work! NC tends to redirect you to the IP. If that happens, you'll have to replace the IP with localhost.