Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating Docker setup #38

Merged
merged 3 commits into from
Mar 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ RUN openssl req -new -x509 -days 365 -nodes \
-subj "/C=RO/ST=Bucharest/L=Bucharest/O=IT/CN=www.example.ro"
RUN apt-get update && apt-get install -yq \
git \
vim
vim \
sudo
WORKDIR /install
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
RUN php composer-setup.php
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ If you enable this app in your Nextcloud instance, you should
[edit your .htaccess file](https://github.com/solid/test-suite/blob/665824af763ddd5dd7242cbc8b18faad4ac304e3/servers/nextcloud-server/init.sh#L5)
and then test whether https://your-nextcloud-server.com/.well-known/openid-configuration redirects to https://your-nextcloud-server.com/apps/solid/openid.

Also, take the CORS instructions from site.conf and add them to your own webserver configuration.

## Unattended testing
To test whether your server is install correctly, you can run Solid's [webid-provider-tests](https://github.com/solid/webid-provider-tests#against-production) against it.

Expand Down
20 changes: 20 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: '3'

services:
pubsub:
build:
context: https://github.com/pdsinterop/php-solid-pubsub-server.git
ports:
- 8080:8080
expose:
- 8080
depends_on:
- nextcloud
nextcloud:
build:
context: ./
dockerfile: Dockerfile
expose:
- 443
ports:
- 443:443
6 changes: 3 additions & 3 deletions init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
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
sed -i "26 i\ 2 => 'thirdparty'," config/config.php
sed -i '61 i\ RewriteRule ^\\.well-known/openid-configuration /apps/solid/openid [R=302,L]' /var/www/html/.htaccess
sed -i "25 i\ 1 => 'server'," /var/www/html/config/config.php
sed -i "26 i\ 2 => 'nextcloud.local'," /var/www/html/config/config.php
echo configured
8 changes: 8 additions & 0 deletions site.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,12 @@
SSLEngine on
SSLCertificateFile "/tls/server.cert"
SSLCertificateKeyFile "/tls/server.key"

SetEnv AccessControlAllowOrigin="*"
SetEnvIf Origin "^(.*)$" AccessControlAllowOrigin=$0
Header always set Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin
Header always set Access-Control-Allow-Credentials true
Header always set Access-Control-Allow-Headers "*, allow, authorization, content-type, dpop"
Header always set Access-Control-Allow-Methods "GET, PUT, POST, OPTIONS, DELETE, PATCH"
Header always set Accept-Patch: application/sparql-update
</VirtualHost>