File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ Dockerfile
2+ .git
Original file line number Diff line number Diff line change 1+ sudo : false
2+ language : php
3+ script :
4+ - sh run-solid-test-suite.sh
Original file line number Diff line number Diff line change 1+ FROM php:7.2-apache
2+ RUN apt-get update && \
3+ apt-get install -y \
4+ git \
5+ zlib1g-dev
6+ WORKDIR /tls
7+ RUN openssl req -new -x509 -days 365 -nodes \
8+ -out server.cert \
9+ -keyout server.key \
10+ -subj "/C=RO/ST=Bucharest/L=Bucharest/O=IT/CN=www.example.ro"
11+ RUN docker-php-ext-install mysqli pdo pdo_mysql zip mbstring
12+ RUN a2enmod rewrite
13+ RUN a2enmod ssl
14+ WORKDIR /install
15+ RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
16+ RUN php composer-setup.php
17+ RUN php -r "unlink('composer-setup.php');"
18+ ADD . /app
19+ WORKDIR /app
20+ RUN php /install/composer.phar install --no-dev --prefer-dist
21+ COPY site.conf /etc/apache2/sites-enabled/site.conf
22+ EXPOSE 443
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -e
3+
4+ # Run the Solid test-suite
5+ docker network create testnet
6+
7+ # Build and start Nextcloud server with code from current repo contents:
8+ docker build -t server .
9+ docker run -d --name server --network=testnet server
10+
11+ docker build -t webid-provider https://github.com/pdsinterop/test-suites.git#master:/testers/webid-provider
12+ docker build -t cookie https://github.com/pdsinterop/test-suites.git#master:servers/php-solid-server/cookie
13+ wget -O /tmp/env-vars-for-test-image.list https://raw.githubusercontent.com/solid/test-suite/master/servers/php-solid-server/env.list
14+ until docker run --rm --network=testnet webid-provider curl -kI https://server 2> /dev/null > /dev/null
15+ do
16+ echo Waiting for server to start, this can take up to a minute ...
17+ docker ps -a
18+ docker logs server || true
19+ sleep 1
20+ done
21+ docker ps -a
22+ docker logs server
23+
24+ echo Getting cookie...
25+ export COOKIE=" ` docker run --cap-add=SYS_ADMIN --network=testnet --env-file /tmp/env-vars-for-test-image.list cookie` "
26+ echo " Running webid-provider tests with cookie $COOKIE "
27+ docker run --rm --network=testnet --env COOKIE=" $COOKIE " --env-file /tmp/env-vars-for-test-image.list webid-provider
28+ # rm /tmp/env-vars-for-test-image.list
29+ # docker stop server
30+ # docker rm server
31+ # docker network remove testnet
Original file line number Diff line number Diff line change 1+ <VirtualHost *:443>
2+ DocumentRoot "/app/web/"
3+ ErrorLog ${APACHE_LOG_DIR}/error.log
4+ CustomLog ${APACHE_LOG_DIR}/access.log combined
5+
6+ SSLEngine on
7+ SSLCertificateFile "/tls/server.cert"
8+ SSLCertificateKeyFile "/tls/server.key"
9+
10+ <FilesMatch "\.(cgi|shtml|phtml|php)$">
11+ SSLOptions +StdEnvVars
12+ </FilesMatch>
13+
14+ <Directory /app/web>
15+ Options Indexes FollowSymLinks
16+ AllowOverride all
17+ Require all granted
18+ </Directory>
19+ DirectoryIndex index.php
20+
21+ <IfModule mod_rewrite.c>
22+ RewriteEngine On
23+ RewriteRule ^(.*)$ /index.php?url=$1 [L,QSA]
24+ </IfModule>
25+ </VirtualHost>
You can’t perform that action at this time.
0 commit comments