nextcloud-dev-docker-compose
Nextcloud development environment using docker-compose
Features
- sqlite setup running on localhost:8010
- mysql setup running on localhost:8011
- Xdebug enabled
Getting startd
git clone git@github.com:nextcloud/server.git
cd server
export NEXTCLOUD_SOURCE=$PWD
docker-compose up
Environment variables
NEXTCLOUD_SOURCE local path to your nextcloud source directory
NEXTCLOUD_AUTOINSTALL set to YES if you want to automatically install
NEXTCLOUD_AUTOINSTALL_APPS set list of apps to be enabled after installation
Using the nc-dev-setup script
Clone the repo to some location of your choice
git clone https://github.com/juliushaertl/nextcloud-docker-dev.git
cd nextcloud-docker-dev
Create a configuration directory
mkdir -p ~/.nextcloud/nc-dev-setup/
Symlink docker-compose file and binary
ln -s nc-dev-setup /usr/local/bin/nc-dev
ln -s docker-compose.yml ~/.nextcloud/nc-dev-setup/docker-compose.yml
Create a configuration file for your source tree:
echo "NEXTCLOUD_SOURCE=~/repos/nextcloud/server" > ~/.nextcloud/nc-dev-server/master.conf
echo "NEXTCLOUD_AUTOINSTALL=YES" >> ~/.nextcloud/nc-dev-server/master.conf
echo "NEXTCLOUD_AUTOINSTALL_APPS=YES" >> ~/.nextcloud/nc-dev-server/master.conf
If you want to use multiple nextcloud versions in parallel, you can easily add another configuration file for that:
echo "NEXTCLOUD_SOURCE=~/repos/nextcloud/server" > ~/.nextcloud/nc-dev-server/stable12.conf
echo "NEXTCLOUD_AUTOINSTALL=YES" >> ~/.nextcloud/nc-dev-server/stable12.conf
echo "NEXTCLOUD_AUTOINSTALL_APPS=YES" >> ~/.nextcloud/nc-dev-server/stable12.conf
LDAP
Example ldif is generated using http://ldapwiki.com/wiki/LDIF%20Generator
occ ldap:show-config +-------------------------------+--------------------------------------------------------------------+ | Configuration | | +-------------------------------+--------------------------------------------------------------------+ | hasMemberOfFilterSupport | 0 | | hasPagedResultSupport | | | homeFolderNamingRule | | | lastJpegPhotoLookup | 0 | | ldapAgentName | cn=admin,dc=example,dc=org | | ldapAgentPassword | *** | | ldapAttributesForGroupSearch | | | ldapAttributesForUserSearch | | | ldapBackupHost | ldap2.example.org | | ldapBackupPort | 389 | | ldapBase | dc=example,dc=org | | ldapBaseGroups | | | ldapBaseUsers | | | ldapCacheTTL | 600 | | ldapConfigurationActive | 1 | | ldapDefaultPPolicyDN | | | ldapDynamicGroupMemberURL | | | ldapEmailAttribute | mail | | ldapExperiencedAdmin | 0 | | ldapExpertUUIDGroupAttr | | | ldapExpertUUIDUserAttr | | | ldapExpertUsernameAttr | | | ldapGidNumber | gidNumber | | ldapGroupDisplayName | cn | | ldapGroupFilter | (&(|(objectclass=organizationalUnit))) | | ldapGroupFilterGroups | | | ldapGroupFilterMode | 0 | | ldapGroupFilterObjectclass | organizationalUnit | | ldapGroupMemberAssocAttr | uniqueMember | | ldapHost | ldap.example.org | | ldapIgnoreNamingRules | | | ldapLoginFilter | (&(|(objectclass=inetOrgPerson)(objectclass=person))(|(uid=%uid))) | | ldapLoginFilterAttributes | uid | | ldapLoginFilterEmail | 0 | | ldapLoginFilterMode | 0 | | ldapLoginFilterUsername | 1 | | ldapNestedGroups | 0 | | ldapOverrideMainServer | | | ldapPagingSize | 500 | | ldapPort | 389 | | ldapQuotaAttribute | | | ldapQuotaDefault | | | ldapTLS | 0 | | ldapUserAvatarRule | default | | ldapUserDisplayName | cn | | ldapUserDisplayName2 | | | ldapUserFilter | (|(objectclass=inetOrgPerson)(objectclass=person)) | | ldapUserFilterGroups | | | ldapUserFilterMode | 0 | | ldapUserFilterObjectclass | inetOrgPerson;person | | ldapUuidGroupAttribute | auto | | ldapUuidUserAttribute | auto | | turnOffCertCheck | 0 | | turnOnPasswordChange | 0 | | useMemberOfToDetectMembership | 1 | +-------------------------------+--------------------------------------------------------------------+