Willekeurig gekozen website gemaakt door student:
(Verouderd screenshot)
Beheer paneel waar docenten sites uploaden:
(Verouderd screenshot)
- Clone this repository
- Run the following commands in the root of that repo:
composer installnpm install- Create and configure the
.envfile, note:- Fill
SD_CLIENT_IDandSD_CLIENT_SECRETwith the correct (secret) app secrets - Students can simply temporarily put
->middleware('auth')in theroutes/web.phpin the comment
- Fill
php artisan storage:linkphp artisan migrate --seednpm run watchphp artisan serve
The website is now available for
- Prospects:
https://info.curio.codes/ - Students who create websites:
https://info.curio.codes/test - Teachers:
https://info.curio.codes/beheer
sudo chown -R www-data:www-data /path/to/this/repo/root- Fill
TESTER_ACCESS_USERandTESTER_ACCESS_PASSWORDwith any combination to protect the test-page from bots/outsiders. Optionally useTESTER_REMOVE_AFTERin env to change the 5 minute test site lifetime default. - To run the queue that removes tester sites:
- Locally for development use:
php artisan queue:work --stop-when-emptyto run the queue manually (wait 5 minutes after adding test site) - On production set this CRON task:
* * * * * cd /path-to-your-project && php artisan queue:work --stop-when-empty >> /dev/null 2>&1(NOTE: untested, but should work...)
- Locally for development use:
- Configure your apache vhosts file to allow access to uploaded files from inside the sandboxed iframe (some students use JS to include content from their site):
<VirtualHost _default_:443>
...
# Ensure this Directory points to the symlink path apache follows (and not the actual storage directory)
<Directory /var/www/html/info/public/storage/>
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</Directory>
...
</VirtualHost>
To test locally it can be useful to add SD_SSL_VERIFYPEER=no to your .env file. This disables SSL verification, which is not recommended for production.
The directory tests/TestData/ contains some websites that can be used to test.