Skip to content

Commit

Permalink
Update shopware
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreGauthier committed Dec 20, 2024
1 parent a0da52c commit b38dc1c
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ jobs:
cd /home/ubuntu/shopware/plugins/GallyPlugin &&
git fetch --all && git reset --hard && git checkout ${{ env.BRANCH }} &&
cd /home/ubuntu/shopware &&
docker compose -f compose.yml up -d --build
docker compose -f compose.yml -f compose.prod.yml up -d --build
"
51 changes: 51 additions & 0 deletions ReadMe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Shopware demo env

## Run a local shopware env with gally

- Clone this repository
- Add gally plugin
```shell
git clone [email protected]:Elastic-Suite/gally-shopware-connector.git plugins/GallyPlugin
```
- Add Luma demo catalog plugin
```shell
git clone [email protected]:Elastic-Suite/shopware-lumage-sample-data-plugin.git plugins/LumaSampleData
```
- Start shopware
```shell
docker compose up -d # without traefik
#docker compose -f compose.yml up -d # with `traefik`
```
- Install plugins
```shell
docker compose exec shopware composer config minimum-stability dev
# Refresh plugin list from source
docker compose exec shopware bin/console plugin:refresh
# Install magento sample data
docker compose exec shopware bin/console plugin:install MagentoLumaSampleDataPlugin
docker compose exec shopware bin/console plugin:activate MagentoLumaSampleDataPlugin
# Install Gally plugin
docker compose exec shopware bin/console plugin:install GallyPlugin
docker compose exec shopware bin/console plugin:activate GallyPlugin
# Clear cache
docker compose exec shopware bin/console cache:clear
```
- Install static analysis tools:
```shell
docker compose exec shopware composer require --dev friendsofphp/php-cs-fixer phpstan/phpstan
```
- You shopware backoffice should be accessible from http://localhost:8082/admin (or http://shopware.docker.localhost/admin with traefik)
- Login with `admin` / `shopware`
- Configure you store frontend from **Sales channels > Storefront**
- Entry point main navigation : Choose *Luma category tree*
- Edit domain to `localhost:8082` (or `shopware.localhost` with traefik)
- Configure gally plugin from **Extensions > My extensions > GallyPlugin > Configure** : enter your local gally instance url and credentials, there is the default value:
- Url: `https://gally.local/api`
- Email: `[email protected]`
- Passwor

- Run static analyse tools :
```shell
docker compose exec shopware vendor/bin/php-cs-fixer fix --dry-run --diff custom/plugins/GallyPlugin/
docker compose exec shopware vendor/bin/phpstan --memory-limit=1G analyse -c custom/plugins/GallyPlugin/phpstan.neon
```
9 changes: 0 additions & 9 deletions compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,3 @@ services:
- "8082:80"
- "3308:3306"
- "44343:443"
environment:
- XDEBUG_ENABLED=1
- XDEBUG_REMOTE_HOST=172.17.0.1

networks:
default:
name: 'connectors-proxy'
external: true

4 changes: 4 additions & 0 deletions compose.prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
services:
shopware:
ports: !override
- "443:443"
20 changes: 18 additions & 2 deletions compose.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,29 @@

services:
shopware:
image: dockware/dev:6.6.2.0
image: dockware/dev:6.6.9.0
ports:
- "443:443"
- target: 433
- target: 80
volumes:
- ./plugins:/var/www/html/custom/plugins:rw,cached
- src_data:/var/www/html/
- db_data:/var/lib/mysql
extra_hosts:
- gally.local:host-gateway
labels:
- traefik.enable=true
# Serve oro over http
- traefik.http.routers.shopware-http.rule=Host(`shopware.docker.localhost`)
- traefik.http.routers.shopware-http.entrypoints=http
# Serve oro over https
- traefik.http.routers.shopware-https.rule=Host(`shopware.docker.localhost`)
- traefik.http.routers.shopware-https.entrypoints=https
- traefik.http.routers.shopware-https.tls=true
environment:
- XDEBUG_ENABLED=0
- XDEBUG_REMOTE_HOST=172.17.0.1
- XDEBUG_SERVER_NAME=shopware.docker.localhost

volumes:
db_data:
Expand Down

0 comments on commit b38dc1c

Please sign in to comment.