Zum Hauptinhalt springen

Docker Dev Environment


The provided docker configuration should not be used in production environments!

Installation on your local machine


If you add foodcoopshop.test to your hosts file, you can use http://foodcoopshop.test:8001. Do not forget to change App.fullBaseUrl to http://foodcoopshop.test:8001.

Installation on Gitpod

Open in Gitpod

  • When all containers are up and running (takes between 1 and 2 minutes), open your Bash-terminal (not the Docker-terminal) and run bash ./devtools/init-dev-setup.sh
  • In your custom_config.php, change App.fullBaseUrl to your custom Gitpod-Domain (starting with https://8001-foodcoopsho-foodcoopsho... Be careful, the domain must not end with a slash!).

Login credentials

Unit Tests

  • docker exec -w /app fcs.php php ./vendor/bin/phpunit
  • Open http://localhost:8081 to get to phpmyadmin of database-test
  • On my local machine the current 546 tests finish in around 1:40 min, On Github Actions they need around 4:30 min.


  • Run composer: docker exec -w /app fcs.php composer install|update|outdated
  • Run npm-check-updates: docker exec -w /app/webroot fcs.php ncu
  • Run npm: docker exec -w /app/webroot fcs.php npm install
  • Running migrations: docker exec -w /app fcs.php bash ./bin/cake migrations migrate
  • Build assets: docker exec -w /app fcs.php bash ./bin/cake asset_compress build

Tips for using Docker on Windows

  • Install Ubuntu and switch to WSL2
  • Docker Desktop: Settings / Resources / WSL Integration: Enable integration with additional distros: Enable "Ubuntu"
  • Clone the repo and start docker from Ubuntu (1.000 times faster than if you start it in Windows)