Benny's Shopware Notebook
  • Introduction
    • How to Get in Touch
  • ddev for Shopware
    • Less than 5 Minutes Install with ddev and Symfony Flex
    • Storefront and Admin Watchers with ddev
    • Message Queue Setup with ddev
    • Contribute with ddev
    • Performance Tweaks
    • RabbitMQ with ddev
    • phpstan pro with ddev
    • Fetch Media from Production or Staging Server
  • Hosting
    • Setting up a Cloud Server with ddev
    • How to Trouble-shoot and Evaluate Environment Variables
    • Media URLs Out Of Sync between Servers
    • RabbitMQ
    • Running Shopware CE with PaaS
    • SFTP-Users
    • Basic-Auth for Shopware 6 with nginx
    • How to Avoid Failed Systemd Units
    • JWT-Secrets as Environment Variables
  • Deployment
    • Close-to-Zero Downtime Deployment
    • Docker-Images for Deployment with Gitlab-Runners
    • PHP Cache Related Issues
  • Development
    • Patching the Core
    • How to Discover Available Updates?
    • Local Testing of Shopware Commercial Features
  • Administration
  • Database
  • Migration
    • Side Effects
Powered by GitBook
On this page

Was this helpful?

  1. ddev for Shopware

Contribute with ddev

This page explains how to setup a local contributing environment for Shopware 6' community edition with ddev.

PreviousMessage Queue Setup with ddevNextPerformance Tweaks

Last updated 1 year ago

Was this helpful?

While comes with a predefined Docker setup file, there is a good reason to use ddev for your local contribution environment: It can be booted in parallel with other ddev projects. In fact, I often have one or more client projects up and running at the same time as a contribution environment.

Within your contribution project folder, initiate ddev with the following command:

ddev config --project-type=shopware6 --disable-settings-management --docroot=shopware/public --create-docroot --web-working-dir=/var/www/html/shopware \
        --database=mysql:8.0 --php-version=8.2 --nodejs-version=20 --webserver-type=apache-fpm \
        --web-environment-add="DATABASE_URL=mysql://db:db@db:3306/db,MAILER_DSN=smtp://localhost:1025?encryption=&auth_mode=,APP_URL=\${DDEV_PRIMARY_URL},APP_DEBUG=1,APP_ENV=dev"

Adjust the php and nodejs versions to the current requirements.

Start ddev and ssh into the web container:

ddev start

Clone your fork of Shopware:

rm -rf shopware && git clone git@github.com:<your-github-user>/shopware.git

Install the dependencies:

ddev exec composer install

Create a .env file and the jwt secrets:

ddev exec bin/console system:setup

The database user, password, host and database are all the same, just: 'db'. I recommend to go for a "dev" setup.

Initialize the database and build the administration and storefront components:

ddev exec composer setup

Voilá, you are set! Run

ddev launch /admin

to bring up the admin UI in your web browser. The admin credentials, as usual are 'admin' and 'shopware'.

Happy contributing!

Shopware 6