Compare commits
1 Commits
optimize-build
...
wip
| Author | SHA1 | Date | |
|---|---|---|---|
| f334ecfbdd |
+1
-1
@@ -47,7 +47,7 @@ RUN bash -c 'echo "xdebug.remote_enable=on" >> /usr/local/etc/php/conf.d/xdebug.
|
||||
echo "xdebug.remote_connect_back=on" >> /usr/local/etc/php/conf.d/xdebug.ini; \
|
||||
echo "xdebug.idekey=PHPSTORM" >> /usr/local/etc/php/conf.d/xdebug.ini; \
|
||||
echo "xdebug.remote_autostart=1" >> /usr/local/etc/php/conf.d/xdebug.ini; \
|
||||
echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
|
||||
echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" >> /usr/local/etc/php/conf.d/xdebug.ini \
|
||||
'
|
||||
|
||||
ADD configs/autoconfig_mysql.php configs/autoconfig_pgsql.php configs/autoconfig_oci.php configs/s3.php configs/config.php /root/
|
||||
|
||||
@@ -55,3 +55,65 @@ If you want to use multiple nextcloud versions in parallel, you can easily add a
|
||||
## 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 |
|
||||
+-------------------------------+--------------------------------------------------------------------+
|
||||
|
||||
+5
-11
@@ -55,21 +55,15 @@ setup() {
|
||||
if [[ "$STATUS" != *"installed: true"* ]]
|
||||
then
|
||||
setup
|
||||
echo "Starting server using $SQL database…"
|
||||
#OCKER_HOST=`/sbin/ip route|awk '/default/ { print $3 }'`
|
||||
|
||||
#echo "xdebug.remote_enable=on" >> /usr/local/etc/php/conf.d/xdebug.ini
|
||||
#echo "xdebug.remote_connect_back=on" >> /usr/local/etc/php/conf.d/xdebug.ini
|
||||
#echo "xdebug.idekey=PHPSTORM" >> /usr/local/etc/php/conf.d/xdebug.ini
|
||||
#echo "xdebug.remote_host=${DOCKER_HOST}" >> /usr/local/etc/php/conf.d/xdebug.ini
|
||||
#echo "xdebug.remote_autostart=1" >> /usr/local/etc/php/conf.d/xdebug.ini
|
||||
|
||||
# run custom shell script from nc root
|
||||
bash /var/www/html/nc-dev-autosetup.sh
|
||||
[ -e /var/www/html/nc-dev-autosetup.sh ] && bash /var/www/html/nc-dev-autosetup.sh
|
||||
|
||||
echo "Finished setup using $SQL database…"
|
||||
fi
|
||||
|
||||
echo "=> Watching log file"
|
||||
tail --follow --retry $WEBROOT/data/nextcloud.log &
|
||||
|
||||
set -e
|
||||
|
||||
echo "=> Starting apache"
|
||||
exec "$@"
|
||||
|
||||
+27
-7
@@ -1,17 +1,37 @@
|
||||
version: '2'
|
||||
|
||||
services:
|
||||
nc-ldap:
|
||||
nc-server-ldap:
|
||||
image: juliushaertl/nextcloud-dev
|
||||
environment:
|
||||
SQL: 'sqlite'
|
||||
NEXTCLOUD_AUTOINSTALL: "YES"
|
||||
NEXTCLOUD_AUTOINSTALL_APPS: "user_ldap"
|
||||
# auto provision ldap config
|
||||
volumes:
|
||||
- /home/jus/repos/nextcloud/server:/var/www/html
|
||||
- nc-data-ldap:/var/www/html/data
|
||||
- nc-apps-ldap:/var/www/html/apps-writable
|
||||
- nc-config-ldap:/var/www/html/config
|
||||
ports:
|
||||
- "8000:80"
|
||||
# use same setup for ldap severs since replication seems broken on osixia/openldap
|
||||
ldap.example.org:
|
||||
image: osixia/openldap
|
||||
command: --copy-service
|
||||
command: --copy-service --loglevel debug
|
||||
volumes:
|
||||
- ./exampledata/example.ldif:/container/service/slapd/assets/config/bootstrap/ldif/50-bootstrap.ldif
|
||||
environment:
|
||||
LDAP_DOMAIN: example.com
|
||||
LDAP_ADMIN_PASSWORD: 'nextcloud'
|
||||
ldap2.example.org:
|
||||
image: osixia/openldap
|
||||
command: --copy-service --loglevel debug
|
||||
volumes:
|
||||
- ./exampledata/example.ldif:/container/service/slapd/assets/config/bootstrap/ldif/50-bootstrap.ldif
|
||||
nc-cache-redis:
|
||||
image: redis:3
|
||||
|
||||
|
||||
|
||||
volumes:
|
||||
nc-data-ldap:
|
||||
|
||||
|
||||
nc-config-ldap:
|
||||
nc-apps-ldap:
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
version: '2'
|
||||
|
||||
services:
|
||||
nc-server-sqlite:
|
||||
build:
|
||||
context: .
|
||||
environment:
|
||||
SQL: 'sqlite'
|
||||
NEXTCLOUD_AUTOINSTALL:
|
||||
NEXTCLOUD_AUTOINSTALL_APPS: "deck"
|
||||
volumes:
|
||||
- '/home/jus/repos/nextcloud/server:/var/www/html'
|
||||
- nc-data-sqlite:/var/www/html/data
|
||||
- nc-config-sqlite:/var/www/html/config
|
||||
ports:
|
||||
- "8000:80"
|
||||
|
||||
volumes:
|
||||
nc-data-sqlite:
|
||||
nc-config-sqlite:
|
||||
|
||||
networks:
|
||||
default:
|
||||
ipam:
|
||||
driver: default
|
||||
config:
|
||||
- subnet: 192.168.21.0/24
|
||||
gateway: 192.168.21.1
|
||||
@@ -52,6 +52,16 @@ export NEXTCLOUD_POSTGRES_PORT
|
||||
|
||||
export COMPOSE_PROJECT_NAME=$CONTAINER_SET
|
||||
export COMPOSE_FILE=$HOME/.nextcloud/nc-dev-setup/docker-compose.yml
|
||||
export COMPOSE_FILE=$HOME/repos/nextcloud/nc-dev/docker-compose.yml
|
||||
|
||||
echo $COMPOSE_FILE
|
||||
LDAP_FILE=$HOME/repos/nextcloud/nc-dev/docker-compose.ldap.yml
|
||||
ELASTIC_FILE=$HOME/repos/nextcloud/nc-dev/docker-compose.elasticsearch.yml
|
||||
if [ -z ${ENABLE_LDAP+x} ]; then true; else export COMPOSE_FILE=$COMPOSE_FILE:$LDAP_FILE ; fi
|
||||
if [ -z ${ENABLE_ELASTIC+x} ]; then true; else export COMPOSE_FILE=$COMPOSE_FILE:$ELASTIC_FILE ; fi
|
||||
|
||||
echo $COMPOSE_FILE
|
||||
|
||||
|
||||
if [ "$2" = "status" ]; then
|
||||
docker-compose ps
|
||||
@@ -82,4 +92,13 @@ elif [ "$2" = "shell" ]; then
|
||||
fi
|
||||
CONTAINER_NAME="${CONTAINER_SET}_nc-server-${SETUP_TYPE}_1"
|
||||
docker exec -ti $CONTAINER_NAME /bin/bash
|
||||
elif [ "$2" = "blackfire" ]; then
|
||||
if [ ! "$(docker ps -q -f name=nc-blackfire)" ]; then
|
||||
if [ "$(docker ps -aq -f status=exited -f name=nc-blackfire)" ]; then
|
||||
# cleanup
|
||||
docker rm nc-blackfire
|
||||
fi
|
||||
# run your container
|
||||
docker run --name="nc-blackfire" --network="${CONTAINER_SET}_default" -d -e BLACKFIRE_SERVER_ID=$BLACKFIRE_SERVER_ID -e BLACKFIRE_SERVER_TOKEN=$BLACKFIRE_SERVER_TOKEN -e BLACKFIRE_LOG_LEVEL=4 blackfire/blackfire
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user