This docker setup was intended to be used with Shopware but as it is that generic you could run almost every PHP based web application that needs a webserver and database.
Feel free to contribute.
- Set a host entry in your local hosts file to
127.0.0.1 dev.local
- Navigate to your projects root
- Execute
git clone git@github.com:Netshops-Commerce-GmbH/docker-setup.git
- Navigate to the created folder with
cd docker-setup/
- Adjust the shopware release url in
docker-compose.yml
- Execute
docker-compose pull
to get the newest images - Change
FULL_WIPE_ON_REBOOT
indocker-compose.yml
to"false"
if you dont need the installation wizard. - Execute
docker-compose up
- If needed run your setup and change
FULL_WIPE_ON_REBOOT
indocker-compose.yml
to"true"
afterwards. Alternatively you can just import an SQL dump. - Open http://dev.local/ in your browser.
- Navigate to the Shopware backend
- Open the Global Settings and search for "Mailer"
- Apply the following settings:
- Method: smtp
- Hostname for message id: mailhog.dev.local
- Mail hostname: mailhog
- Port: 1025
- Prefix:
- SMTP user: test
- SMTP password: test
- Connection auth:
- Open the mailhog webinterface
- Send a mail from the Shopware backend (Settings -> Email Templates -> Choose a template -> Send test email to shop owner)
- datacontainer
- Image: netshops/dev_data_container_shopware:latest
- Description: This container holds a fresh installation of Shopware and extracts it on every "up".
- datasync
- Image: netshops/dev_data_sync:latest
- Description: This container syncs
/var/www/src
into/var/www/html
on "up" and after that constatly withinotify
on file changes.
- webserver
- Image: nginx:stable
- Description: Webserver to serve contents. Can be nginx or apache. Just configure it to your needs.
- phpfpm
- Image: netshops/dev_php_fpm_ioncube
- Description: PHP 7.0 with IonCube Loader and Xdebug
- db
- Image: percona:latest (MySQL Fork)
- Description: A MySQL container. Choose whatever you like (e.g. MySQL, MariaDB, Percona)
- mailfetcher
- Image: mailhog/mailhog:latest
- Description: A mail fetcher. Can be opened under http://dev.local:8025/
- projectname/
- docker-setup/
- services/ (config files mounted as volumes)
- nginx
- percona
- phpfpm
- src/
- config_dev.php (copy to ../../src/)
- services/ (config files mounted as volumes)
- src/ (changed files that are synced into a fresh shop-installation)
- custom/plugins/.../
- engine/Shopware/Plugins/.../
- themes/Frontend/YourThemeName/
- docker-setup/
This project uses the GNU General Public License v3.0.