Giter Club home page Giter Club logo

ddev-sachsendigital's Introduction

ddev-sachsendigital

This repository provides a DDEV-based development environment for Sachsen.Digital.

Quick Start

  1. Clone this repository

    git clone https://github.com/slub/ddev-sachsendigital.git
    cd /mnt/c/Users/kmiec/Projects/ddev-sachsendigital
  2. Initialize the environment

    sudo service docker start
    ./scripts/quickstart.sh
  3. (Optional) Populate your Solr index by indexing or re-indexing sample documents

    ./scripts/doc-reindex.sh
  4. Open the web page in your browser

    ddev launch

Extension Development

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.

Pre-configured

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

Manually

  1. Clone the extension repositories somewhere.
  2. 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:
    version: '3.6'
    services:
      web:
        volumes:
          - /your/path/to/extensions:/var/www/extensions
    Be aware that in relative paths, "." points to .ddev/.
  3. In composer.json, update the repositories field; for example:
    "repositories": {
        "kitodo-presentation": {
            "type": "path",
            "url": "/var/www/extensions/kitodo-presentation"
        },
        // ...
    }
    Composer also supports using wildcards:
    "repositories": {
        "local": {
            "type": "path",
            "url": "/var/www/extensions/*"
        },
        // ...
    }
  4. (Re-)Start DDEV, then tell Composer about the changes to composer.json:
    ddev start
    ddev composer update

URLs

Access Within Local Network

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.

Performance

DDEV comes bundled with XHProf, which may be used to profile web requests and CLI commands.

  1. Enable/disable XHProf:

    ddev xhprof on
    ddev xhprof off
  2. 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.

  3. 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 call pcntl_signal_dispatch() within the command's execution.

Database Dump

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.

Dependencies

  • (Optional) mkcert for locally trusted TLS certificates
  • DDEV

ddev-sachsendigital's People

Contributors

beatrycze-volk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.