Skip to content

Commit

Permalink
Allow Nextcloud version 20
Browse files Browse the repository at this point in the history
  • Loading branch information
michielbdejong committed Oct 16, 2020
1 parent 6dc394f commit 2ce5479
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Dockerfile
env.list
.git
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM nextcloud:latest
COPY site.conf /etc/apache2/sites-enabled/000-default.conf
RUN a2enmod ssl
RUN mkdir /tls
RUN openssl req -new -x509 -days 365 -nodes \
-out /tls/server.cert \
-keyout /tls/server.key \
-subj "/C=RO/ST=Bucharest/L=Bucharest/O=IT/CN=www.example.ro"
RUN apt-get update && apt-get install -yq \
git \
vim
WORKDIR /install
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
RUN php composer-setup.php
RUN php -r "unlink('composer-setup.php');"
ADD ./solid /usr/src/nextcloud/apps/solid
# Run composer:
WORKDIR /usr/src/nextcloud/apps/solid
RUN ls
RUN php /install/composer.phar install --no-dev --prefer-dist
WORKDIR /var/www/html
ADD init.sh /
EXPOSE 443
2 changes: 2 additions & 0 deletions env.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALICE_WEBID=https://server/apps/solid/@alice/turtle#me
COOKIE_TYPE=nextcloud-compatible
7 changes: 7 additions & 0 deletions init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
php console.php maintenance:install --admin-user alice --admin-pass alice123
php console.php status
php console.php app:enable solid
sed -i '61 i\ RewriteRule ^\\.well-known/openid-configuration /apps/solid/openid [R=302,L]' .htaccess
sed -i "25 i\ 1 => 'server'," config/config.php
echo configured
8 changes: 5 additions & 3 deletions run-solid-test-suite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ set -e

# Run the Solid test-suite
docker network create testnet
docker build -t base https://github.com/pdsinterop/test-suites.git#master:/servers/nextcloud-server/base
docker build -t nextcloud-server https://github.com/pdsinterop/test-suites.git#master:/servers/nextcloud-server/server
docker run -d --name server --network=testnet nextcloud-server

# Build and start Nextcloud server with code from current repo contents:
docker build -t server .
docker run -d --name server --network=testnet server

docker build -t webid-provider https://github.com/pdsinterop/test-suites.git#master:/testers/webid-provider
docker build -t cookie https://github.com/pdsinterop/test-suites.git#master:servers/nextcloud-server/cookie
Expand All @@ -25,6 +26,7 @@ docker exec -u root -it server service apache2 reload

echo Getting cookie...
export COOKIE="`docker run --cap-add=SYS_ADMIN --network=testnet --env-file /tmp/env-vars-for-test-image.list cookie`"
echo "Running webid-provider tests with cookie $COOKIE"
docker run --rm --network=testnet --env COOKIE="$COOKIE" --env-file /tmp/env-vars-for-test-image.list webid-provider
# rm /tmp/env-vars-for-test-image.list
# docker stop server
Expand Down
9 changes: 9 additions & 0 deletions site.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<VirtualHost *:443>
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

SSLEngine on
SSLCertificateFile "/tls/server.cert"
SSLCertificateKeyFile "/tls/server.key"
</VirtualHost>
2 changes: 1 addition & 1 deletion solid/appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This app gives you a WebID URL and login flow to connect to a Solid App with you
<category>integration</category>
<bugs>https://github.com/pdsinterop/solid-nextcloud/issues</bugs>
<dependencies>
<nextcloud min-version="15" max-version="19"/>
<nextcloud min-version="15" max-version="25"/>
</dependencies>
<settings>
<admin>\OCA\Solid\Settings</admin>
Expand Down

0 comments on commit 2ce5479

Please sign in to comment.