Skip to main content Link Search Menu Expand Document (external link)

Docker Dev Environment

Warning

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

Installation on your local machine

If you add 127.0.0.1 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

  • The available demo test data is in German.
  • You can chose between 4 different users to login on http://localhost:8001/anmelden
  • Superadmin: fcs-demo-superadmin@mailinator.com / Password: foodcoopshop
  • Admin: fcs-demo-admin@mailinator.com / Password: foodcoopshop
  • Member: fcs-demo-mitglied@mailinator.com / Password: foodcoopshop
  • Manufacturer: fcs-demo-fleisch-hersteller@mailinator.com / Password: foodcoopshop

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 534 tests finish in around 3 min :-) - thanks to tmpfs!

Tools

  • Run composer outdated: docker exec -w /app fcs.php composer outdated
  • Run npm-check-updates: docker exec -w /app/webroot fcs.php ncu
  • Update po-Files (translations): docker exec -w /app fcs.php bash ./devtools/update-translations.sh
  • 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)