This repository provides a DDEV-based development environment for Sachsen.Digital.
-
Clone this repository
git clone https://github.com/slub/ddev-sachsendigital.git cd ddev-sachsendigital
-
Initialize the environment
./scripts/quickstart.sh
-
(Optional) Populate your Solr index by indexing or re-indexing sample documents
./scripts/doc-reindex.sh
-
Open the web page in your browser
ddev launch
This repository is configured to allow an easy local setup of Sachsen.Digital. If you would like to develop on one of the custom TYPO3 extensions, some adjustments are required.
You may use the convenience script scripts/ext-clone.sh
to clone the extensions into a subfolder extensions/
and reconfigure composer.json
:
./scripts/ext-clone.sh
ddev composer update
- Clone the extension repositories somewhere.
- If the extensions are outside of the directory tree of this repository (symlinking is not enough!), create a file
.ddev/docker-compose.mounts.yaml
like this:Be aware that in relative paths, "version: '3.6' services: web: volumes: - /your/path/to/extensions:/var/www/extensions
.
" points to.ddev/
. - In
composer.json
, update therepositories
field; for example:Composer also supports using wildcards:"repositories": { "kitodo-presentation": { "type": "path", "url": "/var/www/extensions/kitodo-presentation" }, // ... }
"repositories": { "local": { "type": "path", "url": "/var/www/extensions/*" }, // ... }
- (Re-)Start DDEV, then tell Composer about the changes to
composer.json
:ddev start ddev composer update
- Backend Login: https://sachsendigital.ddev.site/typo3/
- User:
admin
- Password:
adminslub
- User:
- Solr: http://sachsendigital.ddev.site:8983/solr
- XHProf (if enabled): https://sachsendigital.ddev.site/xhprof/
To make the site accessible on your local network—e.g., to test it on a mobile device—, one option is to expose the web container:
-
Set a new base URL in config/sites/main/config.yaml:
base: 'http://<local-ip-address>:8080'
-
Make the web container reachable, then restart:
ddev config --host-webserver-port=8080 --bind-all-interfaces # .ddev/config.yaml ddev restart ddev typo3cms cache:flush
Some more options are described in the official documentation.
DDEV comes bundled with XHProf, which may be used to profile web requests and CLI commands.
-
Enable/disable XHProf:
ddev xhprof on ddev xhprof off
-
Profiling results are stored in
.ddev/xhprof/*.xhprof
and may be browsed on http://sachsendigital.ddev.site:8983/solr.Call
set_xhprof_namespace("...")
(defined in.ddev/xhprof_prepend.php
) within the application to set a display name for the result list. -
CLI commands: When the command is aborted via Ctrl-C (SIGINT), the shutdown handler is not called and results are not saved. To evade this, call
sxnd_sigint()
at the start of the command, and regularly callpcntl_signal_dispatch()
within the command's execution.
You may use the utility script db-precommit.sh
to cleanup the database and export a dump to data/db.sql
. Note that doing this will log you out.
./scripts/db-precommit.sh
If you find anything in the published database dump that should not be shared, please feel free to open an issue or a pull request.