Skip to content

Instantly share code, notes, and snippets.

@xaiyadev
Created January 15, 2024 15:54
Show Gist options
  • Select an option

  • Save xaiyadev/7f2877504f1fc06b2829946afc10516f to your computer and use it in GitHub Desktop.

Select an option

Save xaiyadev/7f2877504f1fc06b2829946afc10516f to your computer and use it in GitHub Desktop.
Dockware plugin developer optimized docker-compose.yml
# .env file in the Bridge (${DOCKWARE_FOLDER}bridge/.env)
# You can add your own stuff here, this is just like the .env file in the Shopware shop
APP_ENV=dev
XDEBUG_ENABLED=1
COMPOSER_HOME=/var/www/html
# ${DOCKWARE_FOLDER} is a folder where I bridge the Docker Container with the local machine
#
# add this in a .env file located at the same folder as the docker-compose.yml:
# DOCKWARE_FOLDER=${HOME}/Documents/Development/dockware/
version: "3"
services:
shop:
image: dockware/dev:latest
container_name: ${COMPOSE_PROJECT_NAME}
ports:
- "80:80"
- "3306:3306"
- "8888:8888"
- "9999:9999"
- "9998:9998"
networks:
- web
env_file:
- ${DOCKWARE_FOLDER}bridge/.env
volumes:
# External Plugins and this Plugin
- "${DOCKWARE_FOLDER}bridge/Extensions:/var/www/html/custom/plugins/"
- "./:/var/www/html/custom/plugins/${COMPOSE_PROJECT_NAME}"
# Volumes for backup
- "shop_volume:/var/www/html"
- "db_volume:/var/lib/mysql"
stdin_open: true
tty: true
command: bash -c "composer require shopware/dev-tools &&
cd .. && make watch-storefront"
networks:
web:
external: false
volumes:
db_volume:
driver: local
shop_volume:
driver: local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment